fixing
This commit is contained in:
parent
a7a8f47da0
commit
1fde4cd005
1 changed files with 8 additions and 7 deletions
|
|
@ -147,12 +147,13 @@ 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) {
|
// ปิดไว้ก่อนเพราะ error ต้องใช้ keycloak ที่มีสิทธิ์ในการ update
|
||||||
const result = await updateName(profile.keycloak, profile.firstName, profile.lastName);
|
// if (profile != null && profile.keycloak != null) {
|
||||||
if (!result) {
|
// const result = await updateName(profile.keycloak, profile.firstName, profile.lastName);
|
||||||
throw new Error(result.errorMessage);
|
// if (!result) {
|
||||||
}
|
// throw new Error(result.errorMessage);
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
return new HttpSuccess(data.id);
|
return new HttpSuccess(data.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue