fix: wrong field used
This commit is contained in:
parent
cb0ac4f0be
commit
d15273de1b
3 changed files with 3 additions and 3 deletions
|
|
@ -535,7 +535,7 @@ export class BranchController extends Controller {
|
||||||
subDistrict: true,
|
subDistrict: true,
|
||||||
createdBy: true,
|
createdBy: true,
|
||||||
updatedBy: true,
|
updatedBy: true,
|
||||||
user: { where: { id: req.user.sub } },
|
user: { where: { userId: req.user.sub } },
|
||||||
},
|
},
|
||||||
where: { id: branchId },
|
where: { id: branchId },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ export class ProductController extends Controller {
|
||||||
where: { id: body.productTypeId },
|
where: { id: body.productTypeId },
|
||||||
}),
|
}),
|
||||||
prisma.branch.findFirst({
|
prisma.branch.findFirst({
|
||||||
include: { user: { where: { id: req.user.sub } } },
|
include: { user: { where: { userId: req.user.sub } } },
|
||||||
where: { id: body.registeredBranchId },
|
where: { id: body.registeredBranchId },
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ export class ServiceController extends Controller {
|
||||||
where: { id: body.productTypeId },
|
where: { id: body.productTypeId },
|
||||||
}),
|
}),
|
||||||
prisma.branch.findFirst({
|
prisma.branch.findFirst({
|
||||||
include: { user: { where: { id: req.user.sub } } },
|
include: { user: { where: { userId: req.user.sub } } },
|
||||||
where: { id: body.registeredBranchId },
|
where: { id: body.registeredBranchId },
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue