diff --git a/src/app/api/notary/CustomersController.ts b/src/app/api/notary/CustomersController.ts index a6e1d159..83d3d1c9 100644 --- a/src/app/api/notary/CustomersController.ts +++ b/src/app/api/notary/CustomersController.ts @@ -34,8 +34,8 @@ export default class CustomersController extends ApiController { } const officeId: string = req.body.user.office_Id; - if (query.where?.office_folders) delete query.where.office_folders; - const customerWhereInput: Prisma.CustomersWhereInput = { ...query.where, office_folders: { some: { office_uid: officeId } } }; + if (query.where?.office) delete query.where.office; + const customerWhereInput: Prisma.CustomersWhereInput = { ...query.where, office: { uid: officeId } }; query.where = customerWhereInput; //call service to get prisma entity