fix search
This commit is contained in:
parent
69db570268
commit
09c47361f1
3 changed files with 24 additions and 15 deletions
|
|
@ -57,6 +57,7 @@ import { Prefixe } from "../entities/Prefixe";
|
|||
import { ProfileInsignia } from "../entities/ProfileInsignia";
|
||||
import { ProfileDisciplineHistory } from "../entities/ProfileDisciplineHistory";
|
||||
import { ProfileLeave } from "../entities/ProfileLeave";
|
||||
import { updateName } from "../keycloak";
|
||||
|
||||
@Route("api/v1/org/profile")
|
||||
@Tags("Profile")
|
||||
|
|
@ -2321,6 +2322,13 @@ export class ProfileController extends Controller {
|
|||
record.dateRetireLaw = calculateRetireLaw(record.birthDate);
|
||||
await this.profileRepo.save(record);
|
||||
|
||||
if (record != null && record.keycloak != null) {
|
||||
const result = await updateName(record.keycloak, record.firstName, record.lastName);
|
||||
if (!result) {
|
||||
throw new Error(result.errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue