From 12ce8ddff4f66e47646d97a034a0fb783c5518f9 Mon Sep 17 00:00:00 2001 From: OxSaitama Date: Thu, 17 Aug 2023 13:44:50 +0200 Subject: [PATCH] fix where query for documents --- src/app/api/customer/DocumentsController.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/api/customer/DocumentsController.ts b/src/app/api/customer/DocumentsController.ts index fdfb16f2..a7f2b1a7 100644 --- a/src/app/api/customer/DocumentsController.ts +++ b/src/app/api/customer/DocumentsController.ts @@ -28,12 +28,9 @@ export default class DocumentsController extends ApiController { query = JSON.parse(req.query["q"] as string); } - - //This was useless and was causing a bug - - // const customerId: string = req.body.user.customerId; - // const customerWhereInput: Prisma.DocumentsWhereInput ={ depositor: { uid: customerId } }; - // query.where = customerWhereInput; + const customerId: string = req.body.user.customerId; + const customerWhereInput: Prisma.DocumentsWhereInput ={ depositor: { uid: customerId } }; + query.where = customerWhereInput; //call service to get prisma entity