Fix failed publish

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-04-01 19:42:44 +04:00
parent fef4bde231
commit 1385fe00b5
-6
View File
@@ -54,12 +54,6 @@ module.exports = {
},
beforeUpdate: async (params, data) => {
const user = await jwennUserEpiId(data.user.id)
if(!user) {
throw strapi.errors.badRequest('Not found')
}
if (data.tit && !data.forceSlug) {
const awtis = await jwennAwtisEpiId(data.awtis)
data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g})