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) } },