@mattisvensson/strapi-plugin-webatlas 0.3.0 → 0.3.1
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/dist/_chunks/{index-B0XE_zRP.js → index-BAqGJ3TM.js} +1 -1
- package/dist/_chunks/{index-CCiDvLAC.mjs → index-BBL_eQ0G.mjs} +5 -5
- package/dist/_chunks/{index-BocSkZOu.mjs → index-BOq-WidK.mjs} +1 -1
- package/dist/_chunks/{index-BbM9Sn1t.js → index-C4ou6MTp.js} +1 -1
- package/dist/_chunks/{index-B85fJxGa.js → index-CKoxbSC0.js} +5 -5
- package/dist/_chunks/{index-C7B8QHDT.mjs → index-CwHhwtOU.mjs} +1 -1
- package/dist/_chunks/{index-B2Tiv3EK.mjs → index-DZmhgSeq.mjs} +1 -1
- package/dist/_chunks/{index-DGb8ESH-.js → index-DsTyLL2l.js} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +4 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +4 -2
- package/dist/server/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/_chunks/EmptyBox-7D4LrvdH.mjs.map +0 -1
- package/dist/_chunks/EmptyBox-DT6D5gcf.js.map +0 -1
- package/dist/_chunks/_baseConvert-B84_vf8X.js.map +0 -1
- package/dist/_chunks/_baseConvert-C2SW1VHq.mjs.map +0 -1
- package/dist/_chunks/de-4tL_cJTC.js.map +0 -1
- package/dist/_chunks/de-C8PE3n3B.mjs.map +0 -1
- package/dist/_chunks/en-Bg4z3fR7.js.map +0 -1
- package/dist/_chunks/en-CR1YZvJo.mjs.map +0 -1
- package/dist/_chunks/index-B48CGofU.mjs +0 -17170
- package/dist/_chunks/index-B48CGofU.mjs.map +0 -1
- package/dist/_chunks/index-CXzNr2cH.mjs +0 -93
- package/dist/_chunks/index-CXzNr2cH.mjs.map +0 -1
- package/dist/_chunks/index-Cd6y6nuf.js +0 -93
- package/dist/_chunks/index-Cd6y6nuf.js.map +0 -1
- package/dist/_chunks/index-Cf9ZIBLd.js +0 -4195
- package/dist/_chunks/index-Cf9ZIBLd.js.map +0 -1
- package/dist/_chunks/index-D981K4TK.mjs +0 -4179
- package/dist/_chunks/index-D981K4TK.mjs.map +0 -1
- package/dist/_chunks/index-DYiJBXKE.js +0 -10131
- package/dist/_chunks/index-DYiJBXKE.js.map +0 -1
- package/dist/_chunks/index-DjZ3ZaVB.js +0 -17189
- package/dist/_chunks/index-DjZ3ZaVB.js.map +0 -1
- package/dist/_chunks/index-DkhJl5mF.mjs +0 -10131
- package/dist/_chunks/index-DkhJl5mF.mjs.map +0 -1
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/index.mjs.map +0 -1
package/dist/server/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ function transformToUrl(input) {
|
|
|
19
19
|
input = input.replace(/-+/g, "-");
|
|
20
20
|
return input;
|
|
21
21
|
}
|
|
22
|
-
const version = "0.3.
|
|
22
|
+
const version = "0.3.1";
|
|
23
23
|
const keywords = [];
|
|
24
24
|
const type = "commonjs";
|
|
25
25
|
const exports = {
|
|
@@ -238,9 +238,11 @@ const bootstrap = async ({ strapi: strapi2 }) => {
|
|
|
238
238
|
});
|
|
239
239
|
strapi2.db?.lifecycles.subscribe({
|
|
240
240
|
models: config2.selectedContentTypes.map((type2) => type2.uid),
|
|
241
|
-
async beforeCreate() {
|
|
241
|
+
async beforeCreate(event) {
|
|
242
242
|
const validContentTypes = config2.selectedContentTypes.filter((type2) => strapi2.contentTypes[type2.uid]);
|
|
243
243
|
await pluginStore.set({ key: "config", value: { selectedContentTypes: validContentTypes } });
|
|
244
|
+
if (!event.params.data.webatlas_path) return;
|
|
245
|
+
event.params.data.webatlas_path = transformToUrl(event.params.data.webatlas_path);
|
|
244
246
|
},
|
|
245
247
|
async afterCreate(event) {
|
|
246
248
|
const ctSettings = config2.selectedContentTypes.find((type2) => type2.uid === event.model.uid);
|