udp
This commit is contained in:
@ -138,7 +138,7 @@ export class ServiceFareController {
|
||||
|
||||
let param: any = await schema.validateAsync(req.params);
|
||||
|
||||
let serviceFare = await ServiceFareModel.list({ id: param.id })
|
||||
let serviceFare = await ServiceFareModel.list({ "ServiceFare.id": param.id })
|
||||
.then((q) =>
|
||||
q.leftJoinAndSelect("ServiceFare.serviceClass", "serviceClass").leftJoinAndSelect("ServiceFare.service", "service").getOne()
|
||||
);
|
||||
@ -181,7 +181,7 @@ export class ServiceFareController {
|
||||
let service = await ServiceModel.list({ id: param.service_id }).then((q) => q.getOne());
|
||||
if (!service) throw { message: "Service not found" };
|
||||
|
||||
let serviceFare = await ServiceFareModel.list({ id: param.id }).then((q) => q.getOne());
|
||||
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 = {
|
||||
@ -227,7 +227,7 @@ export class ServiceFareController {
|
||||
|
||||
let affected = 0;
|
||||
if (!param.hard) {
|
||||
let serviceFare: ServiceFare = await ServiceFareModel.list({ id: param.id }).then((q) => q.getOne());
|
||||
let serviceFare: ServiceFare = await ServiceFareModel.list({ "ServiceFare.id": param.id }).then((q) => q.getOne());
|
||||
|
||||
if (!serviceFare) throw { message: "Service Fare " + Language.lang.failed_not_found };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user