fix: wrong condition
This commit is contained in:
parent
e911695f3a
commit
bcfc04d6cf
1 changed files with 1 additions and 1 deletions
|
|
@ -227,7 +227,7 @@ export class UserController extends Controller {
|
|||
branch: !["system", "head_of_admin", "admin", "branch_admin"].some((v) =>
|
||||
req.user.roles?.includes(v),
|
||||
)
|
||||
? { some: { userId: req.user.sub } }
|
||||
? { some: { branch: { user: { some: { userId: req.user.sub } } } } }
|
||||
: undefined,
|
||||
},
|
||||
} satisfies Prisma.UserWhereInput;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue