fix: missing paging param

This commit is contained in:
Methapon2001 2024-06-26 13:01:01 +07:00
parent cf317c7d19
commit 8af1ace0d0
2 changed files with 4 additions and 0 deletions

View file

@ -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 }),
]);

View file

@ -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 }),
]);