no message

This commit is contained in:
Kittapath 2024-05-27 16:48:50 +07:00
parent 3438b450ba
commit 9d81bdb470

View file

@ -873,6 +873,21 @@ export class ProfileController extends Controller {
return new HttpSuccess(profile);
}
@Get("keycloak/{id}")
async getProfileByKeycloakId(@Path() id: string) {
const profile = await this.profileRepo.findOne({
relations: {
posLevel: true,
posType: true,
},
where: { keycloak: id },
});
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
return new HttpSuccess(profile);
}
@Get("history/{id}")
async getProfileHistory(@Path() id: string) {
const profile = await this.profileHistoryRepo.find({