@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 +1 -1
- package/src/handlers/articles/URLsHandler.js +5 -2
- package/src/handlers/events/URLsHandler.js +5 -1
- package/src/handlers/pages/URLsHandler.js +5 -1
- package/src/tests/handlers/articles/URLsHandler.test/create.test.js +4 -4
- package/src/tests/handlers/events/URLsHandler.test/create.test.js +2 -2
- package/src/tests/handlers/pages/URLsHandler.test/create.test.js +2 -2
package/package.json
CHANGED
|
@@ -42,8 +42,11 @@ const create = async (ctx) => {
|
|
|
42
42
|
article.articleType.slug,
|
|
43
43
|
ctx.locale
|
|
44
44
|
),
|
|
45
|
-
|
|
46
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
}
|