fix where query for documents

This commit is contained in:
OxSaitama 2023-08-17 13:44:50 +02:00
parent f1fc9deae7
commit 12ce8ddff4

View File

@ -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