add function

This commit is contained in:
AdisakKanthawilang 2024-06-14 14:46:00 +07:00
parent 252ecdf6ee
commit f05c2f4b63

View file

@ -199,6 +199,13 @@ export class ProfileChangeNameController extends Controller {
await this.profileRepository.save(profile);
}
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();
}