OrgDotnetController

This commit is contained in:
Bright 2024-05-27 17:57:16 +07:00
parent 59cefbeec5
commit ccffbe6c4d
3 changed files with 270 additions and 82 deletions

View file

@ -873,20 +873,20 @@ 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 },
});
// @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, "ไม่พบข้อมูล");
// if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
return new HttpSuccess(profile);
}
// return new HttpSuccess(profile);
// }
@Get("history/{id}")
async getProfileHistory(@Path() id: string) {