diff --git a/src/controllers/03-customer-branch-controller.ts b/src/controllers/03-customer-branch-controller.ts index fe48406..fcf6118 100644 --- a/src/controllers/03-customer-branch-controller.ts +++ b/src/controllers/03-customer-branch-controller.ts @@ -171,6 +171,7 @@ export class CustomerBranchController extends Controller { @Request() req: RequestWithUser, @Query() zipCode?: string, @Query() customerId?: string, + @Query() registeredBranchId?: string, @Query() status?: Status, @Query() includeCustomer?: boolean, @Query() query: string = "", @@ -196,6 +197,7 @@ export class CustomerBranchController extends Controller { ? undefined : { registeredBranch: { + AND: { id: registeredBranchId }, OR: permissionCond(req.user), }, },