fix: missing paging param
This commit is contained in:
parent
cf317c7d19
commit
8af1ace0d0
2 changed files with 4 additions and 0 deletions
|
|
@ -68,6 +68,8 @@ export class ProductGroup extends Controller {
|
|||
prisma.productGroup.findMany({
|
||||
orderBy: [{ statusOrder: "asc" }, { createdAt: "asc" }],
|
||||
where,
|
||||
take: pageSize,
|
||||
skip: (page - 1) * pageSize,
|
||||
}),
|
||||
prisma.productGroup.count({ where }),
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ export class ProductType extends Controller {
|
|||
prisma.productType.findMany({
|
||||
orderBy: [{ statusOrder: "asc" }, { createdAt: "asc" }],
|
||||
where,
|
||||
take: pageSize,
|
||||
skip: (page - 1) * pageSize,
|
||||
}),
|
||||
prisma.productType.count({ where }),
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue