แก้ env

This commit is contained in:
Kittapath 2024-07-09 17:03:09 +07:00
parent 5859a46666
commit 360bfe22a8
3 changed files with 25 additions and 4 deletions

View file

@ -2973,6 +2973,27 @@ export class ProfileController extends Controller {
return new HttpSuccess(_profile);
}
/**
* API keycloakid
*
* @summary ORG_065 - keycloakid (ADMIN) #70
*
*/
@Get("keycloakid/position/{id}")
async getProfileByKeycloakid(
@Request() request: { user: Record<string, any> },
@Path() id: string,
) {
const profile = await this.profileRepo.findOne({
where: { keycloak: id },
select: ["id"],
});
if (!profile) {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");
}
return new HttpSuccess(profile);
}
/**
* API citizenId
*