From 12ae8172d5c79e5028a12059f38b1cdcec21b0f9 Mon Sep 17 00:00:00 2001 From: Bright Date: Wed, 25 Dec 2024 12:24:32 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=E0=B8=A5=E0=B8=9A=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=A2=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=81=E0=B8=A5=E0=B8=B8?= =?UTF-8?q?=E0=B9=88=E0=B8=A1=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B8=A5=E0=B8=B9?= =?UTF-8?q?=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=9B=E0=B8=A3?= =?UTF-8?q?=E0=B8=B0=E0=B8=88=E0=B8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/EmployeePosTypeController.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/controllers/EmployeePosTypeController.ts b/src/controllers/EmployeePosTypeController.ts index aedabafe..a7600a10 100644 --- a/src/controllers/EmployeePosTypeController.ts +++ b/src/controllers/EmployeePosTypeController.ts @@ -141,10 +141,11 @@ export class EmployeePosTypeController extends Controller { async deleteType(@Path() id: string, @Request() request: RequestWithUser) { let result: any; try { - result = await this.employeePosTypeRepository.findOne({ - where: { id: id }, - }); - await this.employeePosTypeRepository.remove(result, { data: request }); + // result = await this.employeePosTypeRepository.findOne({ + // where: { id: id }, + // }); + // await this.employeePosTypeRepository.remove(result, { data: request }); + result = await this.employeePosTypeRepository.delete({ id: id }); } catch { throw new HttpError( HttpStatusCode.NOT_FOUND,