This commit is contained in:
Narul Hidayah
2026-02-11 20:51:33 +07:00
parent 9180f4879c
commit 979ae9a558

View File

@ -135,7 +135,7 @@ export class DoctorScheduleController {
let param: any = await schema.validateAsync(req.params);
let doctorSchedule = await DoctorScheduleModel.list({ id: param.id }).then((q) => q.getOne());
let doctorSchedule = await DoctorScheduleModel.list({ "DoctorSchedule.id": param.id }).then((q) => q.getOne());
if (!doctorSchedule) throw { message: "Doctor Schedule Not Found" };
@ -179,7 +179,7 @@ export class DoctorScheduleController {
let doctor = await OrmHelper.DB.getRepository(User).findOne({ where: { id: param.doctor_id } });
if (!doctor) throw { message: "Doctor (User) " + Language.lang.failed_not_found };
let doctorSchedule = await DoctorScheduleModel.list({ id: param.id }).then((q) => q.getOne());
let doctorSchedule = await DoctorScheduleModel.list({ "DoctorSchedule.id": param.id }).then((q) => q.getOne());
if (!doctorSchedule) throw { message: "Doctor Schedule " + Language.lang.failed_not_found };