fix keycloak user & update isDelete
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m1s

This commit is contained in:
Warunee Tamkoo 2026-04-02 16:32:29 +07:00
parent 212360a764
commit fb4196cfa2
9 changed files with 445 additions and 354 deletions

View file

@ -3583,13 +3583,14 @@ export class ProfileEmployeeTempController extends Controller {
// profile.position = _null;
// profile.posLevelId = _null;
// profile.posTypeId = _null;
if (profile.keycloak != null) {
if (profile.keycloak != null && profile.keycloak != "" && profile.isDelete == false) {
const delUserKeycloak = await deleteUser(profile.keycloak);
if (delUserKeycloak) {
// Task #228
// profile.keycloak = _null;
profile.roleKeycloaks = [];
profile.isActive = false;
profile.isDelete = true;
}
}
await this.profileRepo.save(profile);