@raketa-cloud/admin 0.0.50 → 0.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-cloud/admin",
3
- "version": "0.0.50",
3
+ "version": "0.0.51",
4
4
  "main": "src/index.js",
5
5
  "scripts": {
6
6
  "dev": "npx tailwindcss -i ./src/styles/application.css -o ../../apps/admin/static/application.css --watch",
@@ -42,8 +42,11 @@ const create = async (ctx) => {
42
42
  article.articleType.slug,
43
43
  ctx.locale
44
44
  ),
45
- url: `/${article.slug}`,
46
- destination: resource.slug,
45
+ destination: ctx.remoteConfig.resourcePath(
46
+ { slug: resource.slug },
47
+ article.articleType.slug,
48
+ ctx.locale
49
+ ),
47
50
  httpResponseCode: 301,
48
51
  note: `Created with changed URL for a resource of type ${ctx.resourceConfig.articleType}`,
49
52
  };
@@ -40,7 +40,11 @@ const create = async (ctx) => {
40
40
  event.eventType.slug,
41
41
  ctx.locale
42
42
  ),
43
- destination: resource.slug,
43
+ destination: ctx.remoteConfig.resourcePath(
44
+ { slug: resource.slug },
45
+ event.eventType.slug,
46
+ ctx.locale
47
+ ),
44
48
  httpResponseCode: 301,
45
49
  note: `Created with changed URL for a resource of type ${ctx.resourceConfig.eventType}`,
46
50
  };
@@ -38,7 +38,11 @@ const create = async (ctx) => {
38
38
  if (resource.redirect) {
39
39
  redirectParams = {
40
40
  url: ctx.remoteConfig.resourcePath(page, page.pageType.slug, ctx.locale),
41
- destination: resource.slug,
41
+ destination: ctx.remoteConfig.resourcePath(
42
+ { slug: resource.slug },
43
+ page.pageType.slug,
44
+ ctx.locale
45
+ ),
42
46
  httpResponseCode: 301,
43
47
  note: `Created with changed URL for a ${ctx.resourceConfig.pageType}`,
44
48
  };
@@ -46,8 +46,8 @@ describe("Article change url", () => {
46
46
  updateSettings.slug,
47
47
  "en",
48
48
  {
49
- url: `/${article.slug}`,
50
- destination: updateSettings.slug,
49
+ url: `/en/blog/${article.slug}`,
50
+ destination: `/en/blog/${updateSettings.slug}`,
51
51
  httpResponseCode: 301,
52
52
  note: "Created with changed URL for a resource of type article",
53
53
  }
@@ -128,8 +128,8 @@ describe("Article change url", () => {
128
128
  updateSettings.slug,
129
129
  "en",
130
130
  {
131
- url: `/${article.slug}`,
132
- destination: updateSettings.slug,
131
+ url: `/en/blog/${article.slug}`,
132
+ destination: `/en/blog/${updateSettings.slug}`,
133
133
  httpResponseCode: 301,
134
134
  note: "Created with changed URL for a resource of type article",
135
135
  }
@@ -47,7 +47,7 @@ describe("Event change url", () => {
47
47
  "en",
48
48
  {
49
49
  url: `/en/events/${event.slug}`,
50
- destination: updateSettings.slug,
50
+ destination: `/en/events/${updateSettings.slug}`,
51
51
  httpResponseCode: 301,
52
52
  note: "Created with changed URL for a resource of type event",
53
53
  }
@@ -129,7 +129,7 @@ describe("Event change url", () => {
129
129
  "en",
130
130
  {
131
131
  url: `/en/events/${event.slug}`,
132
- destination: updateSettings.slug,
132
+ destination: `/en/events/${updateSettings.slug}`,
133
133
  httpResponseCode: 301,
134
134
  note: "Created with changed URL for a resource of type event",
135
135
  }
@@ -47,7 +47,7 @@ describe("Page change url", () => {
47
47
  "en",
48
48
  {
49
49
  url: `/en/${page.slug}`,
50
- destination: updateSettings.slug,
50
+ destination: `/en/${updateSettings.slug}`,
51
51
  httpResponseCode: 301,
52
52
  note: "Created with changed URL for a page",
53
53
  }
@@ -129,7 +129,7 @@ describe("Page change url", () => {
129
129
  "en",
130
130
  {
131
131
  url: `/en/${page.slug}`,
132
- destination: updateSettings.slug,
132
+ destination: `/en/${updateSettings.slug}`,
133
133
  httpResponseCode: 301,
134
134
  note: "Created with changed URL for a page",
135
135
  }