From 26b21209d4acee24f0d4e47fde74fb6a1fddaf5d Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Mon, 9 Sep 2024 09:10:23 +0700 Subject: [PATCH] fix: stats not accurate due to prev commit --- src/controllers/01-branch-controller.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/controllers/01-branch-controller.ts b/src/controllers/01-branch-controller.ts index ffe95ef..aae08e1 100644 --- a/src/controllers/01-branch-controller.ts +++ b/src/controllers/01-branch-controller.ts @@ -158,9 +158,7 @@ export class BranchController extends Controller { user: { some: { userId: req.user.sub } }, }, { - branch: globalAllow(req.user) - ? { some: { user: { some: { userId: req.user.sub } } } } - : undefined, + branch: { some: { user: { some: { userId: req.user.sub } } } }, }, { headOffice: globalAllow(req.user)