diff --git a/api/awtis/documentation/1.0.0/awtis.json b/api/awtis/documentation/1.0.0/awtis.json index eba5615..4e863e2 100644 --- a/api/awtis/documentation/1.0.0/awtis.json +++ b/api/awtis/documentation/1.0.0/awtis.json @@ -666,6 +666,9 @@ "type": "string" } }, + "forceSlug": { + "type": "boolean" + }, "published_at": { "type": "string" }, diff --git a/api/komante/documentation/1.0.0/komante.json b/api/komante/documentation/1.0.0/komante.json index fa5c693..a058f8b 100644 --- a/api/komante/documentation/1.0.0/komante.json +++ b/api/komante/documentation/1.0.0/komante.json @@ -627,6 +627,9 @@ "type": "string" } }, + "forceSlug": { + "type": "boolean" + }, "published_at": { "type": "string" }, diff --git a/api/teks/documentation/1.0.0/teks.json b/api/teks/documentation/1.0.0/teks.json index 5f972dd..c6b6b76 100644 --- a/api/teks/documentation/1.0.0/teks.json +++ b/api/teks/documentation/1.0.0/teks.json @@ -832,6 +832,9 @@ } } }, + "forceSlug": { + "type": "boolean" + }, "published_at": { "type": "string", "format": "date-time" @@ -966,6 +969,9 @@ "type": "string" } }, + "forceSlug": { + "type": "boolean" + }, "published_at": { "type": "string", "format": "date-time" diff --git a/api/teks/models/teks.js b/api/teks/models/teks.js index 7dd0fcb..fa058e5 100644 --- a/api/teks/models/teks.js +++ b/api/teks/models/teks.js @@ -16,13 +16,13 @@ const jwennAwtisEpiId = async data => { module.exports = { lifecycles: { beforeCreate: async data => { - if (data.tit) { + if (data.tit && !data.forceSlug) { const awtis = await jwennAwtisEpiId(data.awtis) data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g}) } }, beforeUpdate: async (params, data) => { - if (data.tit) { + if (data.tit && !data.forceSlug) { const awtis = await jwennAwtisEpiId(data.awtis) data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g}) } diff --git a/api/teks/models/teks.settings.json b/api/teks/models/teks.settings.json index e49a30b..059f573 100644 --- a/api/teks/models/teks.settings.json +++ b/api/teks/models/teks.settings.json @@ -68,6 +68,9 @@ "komante": { "via": "teks", "collection": "komante" + }, + "forceSlug": { + "type": "boolean" } } } diff --git a/extensions/documentation/documentation/1.0.0/full_documentation.json b/extensions/documentation/documentation/1.0.0/full_documentation.json index 0a6e805..4bd0130 100644 --- a/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -11,7 +11,7 @@ "url": "https://o-k-i.net" }, "license": null, - "x-generation-date": "03/22/2022 6:55:51 AM" + "x-generation-date": "03/23/2022 8:55:05 AM" }, "x-strapi-config": { "path": "/dokiman", @@ -1511,6 +1511,9 @@ "type": "string" } }, + "forceSlug": { + "type": "boolean" + }, "published_at": { "type": "string" }, @@ -1729,6 +1732,9 @@ "type": "string" } }, + "forceSlug": { + "type": "boolean" + }, "published_at": { "type": "string" }, @@ -2099,6 +2105,9 @@ } } }, + "forceSlug": { + "type": "boolean" + }, "published_at": { "type": "string", "format": "date-time" @@ -2233,6 +2242,9 @@ "type": "string" } }, + "forceSlug": { + "type": "boolean" + }, "published_at": { "type": "string", "format": "date-time"