refactor: use helper function

This commit is contained in:
Methapon Metanipat 2024-09-10 14:51:05 +07:00
parent eb30202312
commit 9584f3c5b3

View file

@ -706,15 +706,7 @@ export class UserController extends Controller {
branch: {
include: {
branch: {
include: {
headOffice: {
include: {
branch: { where: { user: { some: { userId: req.user.sub } } } },
user: { where: { userId: req.user.sub } },
},
},
user: { where: { userId: req.user.sub } },
},
include: branchRelationPermInclude(req.user),
},
},
},