|
|
@ -2161,7 +2161,7 @@ class BaseModelSqlv2 { |
|
|
|
let noOfDeletedRecords = data; |
|
|
|
let noOfDeletedRecords = data; |
|
|
|
if (!isBulkAllOperation) { |
|
|
|
if (!isBulkAllOperation) { |
|
|
|
noOfDeletedRecords = data.length; |
|
|
|
noOfDeletedRecords = data.length; |
|
|
|
await this.handleHooks('after.delete', data, null, req); |
|
|
|
await this.handleHooks('after.delete', null, data, req); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
await Audit.insert({ |
|
|
|
await Audit.insert({ |
|
|
@ -2256,7 +2256,7 @@ class BaseModelSqlv2 { |
|
|
|
ip: req?.clientIp, |
|
|
|
ip: req?.clientIp, |
|
|
|
user: req?.user?.email, |
|
|
|
user: req?.user?.email, |
|
|
|
}); |
|
|
|
}); |
|
|
|
await this.handleHooks('after.delete', data, null, req); |
|
|
|
await this.handleHooks('after.delete', null, data, req); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private async handleHooks(hookName, prevData, newData, req): Promise<void> { |
|
|
|
private async handleHooks(hookName, prevData, newData, req): Promise<void> { |
|
|
|