fix: use role name instead (edit endpoint)
This commit is contained in:
parent
d49c20e9fa
commit
721f3bce6e
1 changed files with 1 additions and 1 deletions
|
|
@ -363,7 +363,7 @@ export class UserController extends Controller {
|
|||
}
|
||||
const currentRole = await getUserRoles(userId);
|
||||
|
||||
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]));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue