fix: model destroy with individualHooks

This commit is contained in:
chenos 2020-12-11 14:36:12 +08:00
parent a604eed44d
commit 4f4064ad11

View File

@ -347,6 +347,7 @@ export async function destroy(ctx: Context, next: Next) {
where: resourceKey ? { [primaryKey]: resourceKey } : where, where: resourceKey ? { [primaryKey]: resourceKey } : where,
// @ts-ignore hooks 里添加 context // @ts-ignore hooks 里添加 context
...commonOptions, ...commonOptions,
individualHooks: true,
}); });
ctx.body = data; ctx.body = data;
} }