Fix failed publish
This commit is contained in:
@@ -54,12 +54,6 @@ module.exports = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
beforeUpdate: async (params, data) => {
|
beforeUpdate: async (params, data) => {
|
||||||
const user = await jwennUserEpiId(data.user.id)
|
|
||||||
|
|
||||||
if(!user) {
|
|
||||||
throw strapi.errors.badRequest('Not found')
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.tit && !data.forceSlug) {
|
if (data.tit && !data.forceSlug) {
|
||||||
const awtis = await jwennAwtisEpiId(data.awtis)
|
const awtis = await jwennAwtisEpiId(data.awtis)
|
||||||
data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
||||||
|
|||||||
Reference in New Issue
Block a user