From 9fa5e03d248696133bc9c4b7481bdb52252e20c8 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Wed, 13 Mar 2024 13:45:57 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=80=E0=B8=8A?= =?UTF-8?q?=E0=B9=87=E0=B8=84=E0=B8=AD=E0=B8=B1=E0=B8=88=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B9=83=E0=B8=99=E0=B8=9C=E0=B8=B1=E0=B8=87=E0=B9=80=E0=B8=87?= =?UTF-8?q?=E0=B8=B4=E0=B8=99=E0=B9=80=E0=B8=94=E0=B8=B7=E0=B8=AD=E0=B8=99?= =?UTF-8?q?=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/SalaryRankEmployeeController.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/SalaryRankEmployeeController.ts b/src/controllers/SalaryRankEmployeeController.ts index 829bfd7..cbd5535 100644 --- a/src/controllers/SalaryRankEmployeeController.ts +++ b/src/controllers/SalaryRankEmployeeController.ts @@ -23,7 +23,7 @@ import { SalaryRankEmployees, UpdateSalaryRankEmployee, } from "../entities/SalaryRankEmployees"; -import { Salarys } from "../entities/Salarys"; +import { SalaryEmployees } from "../entities/SalaryEmployees"; @Route("api/v1/salary/rate/employee") @Tags("SalaryRankEmployee") @Security("bearerAuth") @@ -34,7 +34,7 @@ import { Salarys } from "../entities/Salarys"; @SuccessResponse(HttpStatusCode.OK, "สำเร็จ") export class SalaryRankEmployeesController extends Controller { private salaryRankEmployeeRepository = AppDataSource.getRepository(SalaryRankEmployees); - private salaryRepository = AppDataSource.getRepository(Salarys); + private salaryEmployeeRepository = AppDataSource.getRepository(SalaryEmployees); /** * API สร้างอัตราเงินเดือนลูกจ้าง @@ -48,7 +48,7 @@ export class SalaryRankEmployeesController extends Controller { @Request() request: { user: Record }, ) { try { - const checkSalary = await this.salaryRepository.findOne({ + const checkSalary = await this.salaryEmployeeRepository.findOne({ where: { id: requestBody.salaryEmployeeId }, }); if (!checkSalary) {