mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 00:39:49 +00:00
Merge pull request #394 from strapi/fix/models-functions
Fix models functions life cycle
This commit is contained in:
commit
a19a445d73
@ -87,6 +87,7 @@ module.exports = function (strapi) {
|
||||
// Initialize lifecycle callbacks.
|
||||
const preLifecycle = {
|
||||
validate: 'beforeCreate',
|
||||
findOneAndRemove: 'beforeDestroy',
|
||||
remove: 'beforeDestroy',
|
||||
update: 'beforeUpdate',
|
||||
find: 'beforeFetchAll',
|
||||
@ -104,6 +105,7 @@ module.exports = function (strapi) {
|
||||
|
||||
const postLifecycle = {
|
||||
validate: 'afterCreate',
|
||||
findOneAndRemove: 'afterDestroy',
|
||||
remove: 'afterDestroy',
|
||||
update: 'afterUpdate',
|
||||
find: 'afterFetchAll',
|
||||
|
Loading…
x
Reference in New Issue
Block a user