no message

This commit is contained in:
kittapath 2024-10-31 13:46:32 +07:00
parent 4aa3c979b8
commit e974821777
2 changed files with 20 additions and 1 deletions

View file

@ -3199,7 +3199,7 @@ export class PositionController extends Controller {
) {
let typeCondition: any = {};
let conditionA =
"posType.posTypeId LIKE :posTypeName AND posLevel.posLevelName LIKE :posLevel AND positions.positionName LIKE :position";
"posType.posTypeName LIKE :posType AND posLevel.posLevelName LIKE :posLevel AND positions.positionName LIKE :position";
let posType = await this.posTypeRepository.findOne({
where: { id: String(body.posType) },

View file

@ -2814,6 +2814,25 @@ export class ProfileController extends Controller {
return new HttpSuccess(profile);
}
/**
* API
*
* @summary ORG_065 - (ADMIN) #70
*
* @param {string} id Id
*/
@Get("keycloak")
async getProfileIdByKeycloak(@Request() request: RequestWithUser) {
const profile = await this.profileRepo.findOne({
where: { keycloak: request.user.sub },
select:["id"]
});
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
return new HttpSuccess(profile.id);
}
@Get("type")
async checkRole(@Request() request: RequestWithUser) {
let role: any;