refactor: use helper function
This commit is contained in:
parent
eb30202312
commit
9584f3c5b3
1 changed files with 1 additions and 9 deletions
|
|
@ -706,15 +706,7 @@ export class UserController extends Controller {
|
||||||
branch: {
|
branch: {
|
||||||
include: {
|
include: {
|
||||||
branch: {
|
branch: {
|
||||||
include: {
|
include: branchRelationPermInclude(req.user),
|
||||||
headOffice: {
|
|
||||||
include: {
|
|
||||||
branch: { where: { user: { some: { userId: req.user.sub } } } },
|
|
||||||
user: { where: { userId: req.user.sub } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
user: { where: { userId: req.user.sub } },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue