fix: wrong condition

This commit is contained in:
Methapon Metanipat 2024-09-06 15:10:31 +07:00
parent 1385e37f8f
commit 5049392caf

View file

@ -306,8 +306,8 @@ export class EmployeeController extends Controller {
OR: [ OR: [
{ user: { some: { userId: req.user.sub } } }, { user: { some: { userId: req.user.sub } } },
{ {
headOffice: !globalAllow(req.user) branch: globalAllow(req.user)
? { user: { some: { userId: req.user.sub } } } ? { some: { user: { some: { userId: req.user.sub } } } }
: undefined, : undefined,
}, },
], ],