diff --git a/src/controllers/ProfileAbilityController.ts b/src/controllers/ProfileAbilityController.ts index 7610f058..7c889bed 100644 --- a/src/controllers/ProfileAbilityController.ts +++ b/src/controllers/ProfileAbilityController.ts @@ -123,12 +123,12 @@ export class ProfileAbilityController extends Controller { @Path() abilityId: string, @Request() req: RequestWithUser, ) { - const _record = await this.profileAbilityRepo.findOne({ - where: { id: abilityId }, - }); - if (_record) { - await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); - } + // const _record = await this.profileAbilityRepo.findOne({ + // where: { id: abilityId }, + // }); + // if (_record) { + // await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); + // } const record = await this.profileAbilityHistoryRepo.find({ relations: ["histories"], where: { profileAbilityId: abilityId }, diff --git a/src/controllers/ProfileAssessmentsController.ts b/src/controllers/ProfileAssessmentsController.ts index 316b76eb..53c3a321 100644 --- a/src/controllers/ProfileAssessmentsController.ts +++ b/src/controllers/ProfileAssessmentsController.ts @@ -144,14 +144,14 @@ export class ProfileAssessmentsController extends Controller { if (!record) { throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); } - const _record = await this.profileAssessmentsRepository.findOne({ - where: { - id: assessmentId, - }, - }); - if (_record) { - await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); - } + // const _record = await this.profileAssessmentsRepository.findOne({ + // where: { + // id: assessmentId, + // }, + // }); + // if (_record) { + // await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); + // } return new HttpSuccess(record); } diff --git a/src/controllers/ProfileCertificateController.ts b/src/controllers/ProfileCertificateController.ts index 76499740..7aa4140b 100644 --- a/src/controllers/ProfileCertificateController.ts +++ b/src/controllers/ProfileCertificateController.ts @@ -111,10 +111,10 @@ export class ProfileCertificateController extends Controller { ], }) public async certificateHistory(@Path() certificateId: string, @Request() req: RequestWithUser) { - const _record = await this.certificateRepo.findOneBy({ id: certificateId }); - if (_record) { - await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); - } + // const _record = await this.certificateRepo.findOneBy({ id: certificateId }); + // if (_record) { + // await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); + // } const record = await this.certificateHistoryRepo.findBy({ profileCertificateId: certificateId, }); diff --git a/src/controllers/ProfileEducationsController.ts b/src/controllers/ProfileEducationsController.ts index bf81e0fd..0d276398 100644 --- a/src/controllers/ProfileEducationsController.ts +++ b/src/controllers/ProfileEducationsController.ts @@ -168,10 +168,10 @@ export class ProfileEducationsController extends Controller { ], }) public async getProfileEducationHistory(@Path() educationId: string, @Request() req: RequestWithUser) { - const _record = await this.profileEducationRepo.findOneBy({ id: educationId }); - if (_record) { - await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); - } + // const _record = await this.profileEducationRepo.findOneBy({ id: educationId }); + // if (_record) { + // await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); + // } const record = await this.profileEducationHistoryRepo.findBy({ profileEducationId: educationId, }); diff --git a/src/controllers/ProfileOtherController.ts b/src/controllers/ProfileOtherController.ts index a457f029..689df047 100644 --- a/src/controllers/ProfileOtherController.ts +++ b/src/controllers/ProfileOtherController.ts @@ -85,10 +85,10 @@ export class ProfileOtherController extends Controller { ], }) public async otherHistory(@Path() otherId: string, @Request() req: RequestWithUser) { - const _record = await this.otherRepository.findOneBy({ id: otherId }); - if (_record) { - await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); - } + // const _record = await this.otherRepository.findOneBy({ id: otherId }); + // if (_record) { + // await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); + // } const record = await this.otherHistoryRepository.find({ where: { profileOtherId: otherId }, order: { createdAt: "DESC" }, diff --git a/src/controllers/ProfileSalaryController.ts b/src/controllers/ProfileSalaryController.ts index 48bbdac3..f87ba460 100644 --- a/src/controllers/ProfileSalaryController.ts +++ b/src/controllers/ProfileSalaryController.ts @@ -143,10 +143,10 @@ export class ProfileSalaryController extends Controller { ], }) public async salaryHistory(@Path() salaryId: string, @Request() req: RequestWithUser) { - const _record = await this.salaryRepo.findOneBy({ id: salaryId }); - if (_record) { - await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); - } + // const _record = await this.salaryRepo.findOneBy({ id: salaryId }); + // if (_record) { + // await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); + // } const record = await this.salaryHistoryRepo.findBy({ profileSalaryId: salaryId, });