This commit is contained in:
AdisakKanthawilang 2024-06-14 13:29:36 +07:00
parent 24820c4322
commit 8a3b374701

View file

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