no message

This commit is contained in:
kittapath 2024-11-21 15:39:38 +07:00
parent 9991b3c8ce
commit d220430325
4 changed files with 62 additions and 44 deletions

View file

@ -231,6 +231,7 @@ export class KeycloakController extends Controller {
profile.keycloak = null_;
profile.roleKeycloaks = [];
await this.profileRepo.save(profile);
return new HttpSuccess();
}
}
// @Security("bearerAuth", ["system", "admin"])
@ -280,6 +281,7 @@ export class KeycloakController extends Controller {
);
if (!result) throw new Error("Failed. Cannot set user's role.");
return new HttpSuccess();
}
@Delete("{userId}/role/{roleId}")
@ -310,6 +312,7 @@ export class KeycloakController extends Controller {
list.filter((v) => roleId === v.id),
);
if (!result) throw new Error("Failed. Cannot remove user's role.");
return new HttpSuccess();
}
/*@Get("user")
@ -517,6 +520,7 @@ export class KeycloakController extends Controller {
);
}),
)
.orderBy("profile.citizenId", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)
.getManyAndCount();
@ -546,6 +550,7 @@ export class KeycloakController extends Controller {
);
}),
)
.orderBy("profileEmployee.citizenId", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)
.getManyAndCount();