fix: emit async

This commit is contained in:
ChengLei Shao 2023-06-07 17:25:06 +08:00
parent ad2908dd76
commit 5e4682be72

View File

@ -32,7 +32,7 @@ export async function checkAction(ctx, next) {
let role = ctx.app.acl.getRole(currentRole);
if (!role) {
await ctx.app.emit('acl:writeRoleToACL', roleInstance);
await ctx.app.emitAsync('acl:writeRoleToACL', roleInstance);
role = ctx.app.acl.getRole(currentRole);
}