no message
This commit is contained in:
parent
219a9ff104
commit
1d6a590e43
1 changed files with 7 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ export class KeycloakController extends Controller {
|
|||
firstName?: string;
|
||||
lastName?: string;
|
||||
email?: string;
|
||||
roles?: string[];
|
||||
roles: string[];
|
||||
profileId?: string;
|
||||
},
|
||||
) {
|
||||
|
|
@ -105,6 +105,12 @@ export class KeycloakController extends Controller {
|
|||
if (typeof userId !== "string") {
|
||||
throw new Error(userId.errorMessage);
|
||||
}
|
||||
const list = await getRoles();
|
||||
if (!Array.isArray(list)) throw new Error("Failed. Cannot get role(s) data from the server.");
|
||||
const result = await addUserRoles(
|
||||
userId,
|
||||
list.filter((v) => body.roles.includes(v.id)),
|
||||
);
|
||||
|
||||
const now = new Date().toISOString();
|
||||
const folderData: any = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue