no message
This commit is contained in:
parent
3438b450ba
commit
9d81bdb470
1 changed files with 15 additions and 0 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue