refactor: change the role to roles and many to many
This commit is contained in:
@@ -17,6 +17,6 @@ export class JwtStrategy extends PassportStrategy(Strategy, JWT_STRATEGY_NAME) {
|
||||
}
|
||||
|
||||
async validate(payload: ITokenPayload) {
|
||||
return { id: payload.sub, role: payload.role };
|
||||
return { id: payload.id, roles: payload.roles, permissions: payload.permissions };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user