mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-09 17:09:08 +00:00
FEAT: protected update route with admin seqid or if user request to equal a jwt user id claim
This commit is contained in:
@@ -149,7 +149,7 @@ export class UsersService implements OnModuleInit {
|
||||
|
||||
async updateUser(req: UpdateUserReq, id: string, customerId: string) {
|
||||
const { roleNames, ...updateUserDTO } = req;
|
||||
if (roleNames) {
|
||||
if (roleNames && roleNames.length > 0) {
|
||||
await this.setRoles({ roleNames, userId: id }, customerId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user