From 16ffc551b40efa9d637ea9c4cbf72a6420943acc Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Mon, 28 Oct 2024 13:00:40 +0700 Subject: [PATCH] fix: wrong variable used --- src/controllers/03-customer-branch-controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/03-customer-branch-controller.ts b/src/controllers/03-customer-branch-controller.ts index b30b744..66b4e12 100644 --- a/src/controllers/03-customer-branch-controller.ts +++ b/src/controllers/03-customer-branch-controller.ts @@ -340,7 +340,7 @@ export class CustomerBranchController extends Controller { }, }), prisma.user.findFirst({ - where: { id: body.customerId || undefined }, + where: { id: body.agentUserId || undefined }, include: { branch: { include: { branch: { include: branchRelationPermInclude(req.user) } }, @@ -469,7 +469,7 @@ export class CustomerBranchController extends Controller { }, }), prisma.user.findFirst({ - where: { id: body.customerId || undefined }, + where: { id: body.agentUserId || undefined }, include: { branch: { include: { branch: { include: branchRelationPermInclude(req.user) } },