diff --git a/src/controllers/03-customer-branch-controller.ts b/src/controllers/03-customer-branch-controller.ts index 0f4830d..6bc535c 100644 --- a/src/controllers/03-customer-branch-controller.ts +++ b/src/controllers/03-customer-branch-controller.ts @@ -391,7 +391,7 @@ export class CustomerBranchController extends Controller { ); } } else { - if (!affilationBranch || !affilationHeadBranch) { + if (!affilationBranch && !affilationHeadBranch) { throw new HttpError( HttpStatus.FORBIDDEN, "You do not have permission to perform this action.", @@ -544,7 +544,7 @@ export class CustomerBranchController extends Controller { ); } } else { - if (!affilationBranch || !affilationHeadBranch) { + if (!affilationBranch && !affilationHeadBranch) { throw new HttpError( HttpStatus.FORBIDDEN, "You do not have permission to perform this action.",