fix: wrong varialbe used
This commit is contained in:
parent
f12178c0a2
commit
68668544c2
1 changed files with 3 additions and 4 deletions
|
|
@ -236,7 +236,6 @@ export class EmployeeController extends Controller {
|
|||
@Query() pageSize: number = 30,
|
||||
@Body()
|
||||
body?: {
|
||||
query?: string;
|
||||
passport?: string[];
|
||||
},
|
||||
) {
|
||||
|
|
@ -258,9 +257,9 @@ export class EmployeeController extends Controller {
|
|||
]) ?? []),
|
||||
...(queryOrNot<Prisma.EmployeeWhereInput[]>(!!body, [
|
||||
{
|
||||
employeePassport: {
|
||||
some: { number: { contains: query } },
|
||||
},
|
||||
employeePassport: body?.passport
|
||||
? { some: { number: { in: body?.passport } } }
|
||||
: undefined,
|
||||
},
|
||||
]) ?? []),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue