diff --git a/src/controllers/ProfileChangeNameController.ts b/src/controllers/ProfileChangeNameController.ts index d6a0d2aa..b2a3f163 100644 --- a/src/controllers/ProfileChangeNameController.ts +++ b/src/controllers/ProfileChangeNameController.ts @@ -147,12 +147,13 @@ 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); - if (!result) { - throw new Error(result.errorMessage); - } - } + // ปิดไว้ก่อนเพราะ error ต้องใช้ keycloak ที่มีสิทธิ์ในการ update + // 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); } @@ -205,7 +206,7 @@ export class ProfileChangeNameController extends Controller { throw new Error(result.errorMessage); } } - + return new HttpSuccess(); }