fix: wrong variable used

This commit is contained in:
Methapon Metanipat 2024-10-28 13:00:40 +07:00
parent de5bb96422
commit 16ffc551b4

View file

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