feat: use role name instead
This commit is contained in:
parent
fb158b2457
commit
d49c20e9fa
1 changed files with 1 additions and 1 deletions
|
|
@ -274,7 +274,7 @@ export class UserController extends Controller {
|
||||||
throw new Error("Cannot create user with keycloak service.");
|
throw new Error("Cannot create user with keycloak service.");
|
||||||
}
|
}
|
||||||
|
|
||||||
const role = list.find((v) => v.id === body.userRole);
|
const role = list.find((v) => v.name === body.userRole);
|
||||||
|
|
||||||
const resultAddRole = role && (await addUserRoles(userId, [role]));
|
const resultAddRole = role && (await addUserRoles(userId, [role]));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue