From 51a790f40473469624ba055d3ae954484acf8146 Mon Sep 17 00:00:00 2001 From: Narul Hidayah Date: Thu, 12 Feb 2026 15:01:32 +0700 Subject: [PATCH] upd --- src/controllers/service_fare.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/controllers/service_fare.ts b/src/controllers/service_fare.ts index 4fa8a3a..345cdc6 100644 --- a/src/controllers/service_fare.ts +++ b/src/controllers/service_fare.ts @@ -97,12 +97,12 @@ export class ServiceFareController { let service = await ServiceModel.list({ id: param.service_id }).then((q) => q.getOne()); if (!service) throw { message: "Service not found" }; - let filter = { - serviceClassId: param.service_class_id, - serviceId: param.service_id, - }; - let exist = await ServiceFareModel.list(filter).then((q) => q.getOne()); - if (exist) throw { message: "Service Fare " + Language.lang.failed_duplicate }; + // let filter = { + // serviceClassId: param.service_class_id, + // serviceId: param.service_id, + // }; + // let exist = await ServiceFareModel.list(filter).then((q) => q.getOne()); + // if (exist) throw { message: "Service Fare " + Language.lang.failed_duplicate }; let serviceFare = new ServiceFare(); serviceFare.serviceClass = serviceClass; @@ -184,12 +184,12 @@ export class ServiceFareController { let serviceFare = await ServiceFareModel.list({ "ServiceFare.id": param.id }).then((q) => q.getOne()); if (!serviceFare) throw { message: "Service Fare " + Language.lang.failed_not_found }; - let filter = { - serviceClassId: param.service_class_id, - serviceId: param.service_id, - }; - let exist = await ServiceFareModel.list(filter).then((q) => q.getOne()); - if (exist && exist.id != param.id) throw { message: "Service Fare " + Language.lang.failed_duplicate }; + // let filter = { + // serviceClassId: param.service_class_id, + // serviceId: param.service_id, + // }; + // let exist = await ServiceFareModel.list(filter).then((q) => q.getOne()); + // if (exist && exist.id != param.id) throw { message: "Service Fare " + Language.lang.failed_duplicate }; serviceFare.serviceClass = serviceClass; serviceFare.service = service;