diff --git a/src/controllers/ProfileAbilityController.ts b/src/controllers/ProfileAbilityController.ts index d92c96aa..2f599029 100644 --- a/src/controllers/ProfileAbilityController.ts +++ b/src/controllers/ProfileAbilityController.ts @@ -66,12 +66,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({ where: { profileAbilityId: abilityId }, order: { createdAt: "DESC" }, diff --git a/src/controllers/ProfileAssessmentsController.ts b/src/controllers/ProfileAssessmentsController.ts index 681de617..314250c7 100644 --- a/src/controllers/ProfileAssessmentsController.ts +++ b/src/controllers/ProfileAssessmentsController.ts @@ -70,11 +70,6 @@ export class ProfileAssessmentsController extends Controller { @Path() assessmentId: string, @Request() req: RequestWithUser, ) { - const _record = await this.profileAssessmentsRepository.findOneBy({ - id: assessmentId, - }); - if (_record) - await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId); const record = await this.profileAssessmentsHistoryRepository.find({ where: { profileAssessmentId: assessmentId, @@ -85,6 +80,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); + // } return new HttpSuccess(record); } diff --git a/src/controllers/ProfileCertificateController.ts b/src/controllers/ProfileCertificateController.ts index 18a8aba0..cb749795 100644 --- a/src/controllers/ProfileCertificateController.ts +++ b/src/controllers/ProfileCertificateController.ts @@ -57,10 +57,10 @@ export class ProfileCertificateController extends Controller { @Get("history/{certificateId}") 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.find({ where: { profileCertificateId: certificateId, diff --git a/src/controllers/ProfileEducationsController.ts b/src/controllers/ProfileEducationsController.ts index d7131240..c960dc3d 100644 --- a/src/controllers/ProfileEducationsController.ts +++ b/src/controllers/ProfileEducationsController.ts @@ -68,10 +68,10 @@ export class ProfileEducationsController extends Controller { @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.find({ where: { profileEducationId: educationId, diff --git a/src/controllers/ProfileOtherController.ts b/src/controllers/ProfileOtherController.ts index 14e3e3a4..e414211f 100644 --- a/src/controllers/ProfileOtherController.ts +++ b/src/controllers/ProfileOtherController.ts @@ -54,10 +54,10 @@ export class ProfileOtherController extends Controller { @Get("history/{otherId}") 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 94c2e633..5f47f471 100644 --- a/src/controllers/ProfileSalaryController.ts +++ b/src/controllers/ProfileSalaryController.ts @@ -65,10 +65,10 @@ export class ProfileSalaryController extends Controller { @Get("history/{salaryId}") 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.find({ where: { profileSalaryId: salaryId,