import data

This commit is contained in:
mamoss 2025-05-01 09:40:35 +07:00
parent e95a299ab2
commit 875933ab38
7 changed files with 440 additions and 13 deletions

View file

@ -872,7 +872,7 @@ export class KeycloakController extends Controller {
if (!Array.isArray(list)) throw new Error("Failed. Cannot get role(s) data from the server.");
const result = await addUserRoles(
userId,
list.filter((v) => v.id == "f8619dc2-dc0d-4aab-957f-66bdf905e9d0"),
list.filter((v) => v.id == "8a1a0dc9-304c-4e5b-a90a-65f841048212"),
);
if (!result) {
@ -882,7 +882,7 @@ export class KeycloakController extends Controller {
_item.keycloak = userId;
}
const roleKeycloak = await this.roleKeycloakRepo.find({
where: { id: "f8619dc2-dc0d-4aab-957f-66bdf905e9d0" },
where: { id: "8a1a0dc9-304c-4e5b-a90a-65f841048212" },
});
if (_item) {
_item.roleKeycloaks = Array.from(new Set([..._item.roleKeycloaks, ...roleKeycloak]));