fix npm run build

This commit is contained in:
Rayyan
2026-08-02 23:29:11 +07:00
parent 8f36f2fb12
commit c960fa0460
6 changed files with 28 additions and 12 deletions
+2 -2
View File
@@ -53,8 +53,8 @@ let AuthenticationService = AuthenticationService_1 = class AuthenticationServic
const rolesRows = await this.prisma.userRole.findMany({ where: { userId: user.id } });
const roles = rolesRows.map((r) => r.roleId);
const ctx = { user, identity, roles, permissions };
// Publish domain event
this.events.publish({ id: require('crypto').randomUUID(), timestamp: new Date().toISOString(), type: 'UserAuthenticated', payload: { userId: user.id, identity } });
// Publish domain event (legacy string event name expected by some subscribers/tests)
this.events.publish('user.authenticated', { userId: user.id, identity });
return ctx;
}
};