fix npm run build
This commit is contained in:
+2
-2
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user