diff --git a/src/api/slot/content-types/slot/lifecycles.ts b/src/api/slot/content-types/slot/lifecycles.ts index 27cad7e..aae12dd 100644 --- a/src/api/slot/content-types/slot/lifecycles.ts +++ b/src/api/slot/content-types/slot/lifecycles.ts @@ -130,15 +130,15 @@ export default { } } }, - async beforeDelete(event) { - const { where } = event.params; - const slotId = where.id; - const slot = await strapi.db.query('api::slot.slot').findOne({ - where: { id: slotId }, - populate: ['orders'], - }); - if (slot?.orders?.length) { - throw new Error(ERR_SLOT_HAS_ORDERS); - } - }, + // async beforeDelete(event) { + // const { where } = event.params; + // const slotId = where.id; + // const slot = await strapi.db.query('api::slot.slot').findOne({ + // where: { id: slotId }, + // populate: ['orders'], + // }); + // if (slot?.orders?.length) { + // throw new Error(ERR_SLOT_HAS_ORDERS); + // } + // }, };