fix: condition

This commit is contained in:
Methapon Metanipat 2024-09-06 14:54:31 +07:00
parent ae5601544c
commit 1385e37f8f
3 changed files with 6 additions and 6 deletions

View file

@ -115,8 +115,8 @@ export class BranchController extends Controller {
user: { some: { userId: req.user.sub } },
},
{
headOffice: globalAllow(req.user)
? { user: { some: { userId: req.user.sub } } }
branch: globalAllow(req.user)
? { some: { user: { some: { userId: req.user.sub } } } }
: undefined,
},
],