This commit is contained in:
AdisakKanthawilang 2024-06-14 14:38:17 +07:00
parent bed7dbb896
commit a213d75c70
2 changed files with 13 additions and 11 deletions

View file

@ -147,12 +147,12 @@ export class ProfileChangeNameController extends Controller {
profile.prefix = body.prefix ?? profile.prefix;
await this.profileRepository.save(profile);
// if (profile != null && profile.keycloak != null) {
// const result = await updateName(profile.keycloak, profile.firstName, profile.lastName, req);
// if (!result) {
// throw new Error(result.errorMessage);
// }
// }
if (profile != null && profile.keycloak != null) {
const result = await updateName(profile.keycloak, profile.firstName, profile.lastName);
if (!result) {
throw new Error(result.errorMessage);
}
}
return new HttpSuccess(data.id);
}