fix: missing prisma query take and skip
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 15s

This commit is contained in:
HAM 2026-01-12 13:15:31 +07:00
parent 16c4c64c89
commit cef26278ba

View file

@ -156,7 +156,6 @@ export class CreditNoteController extends Controller {
@Query() creditNoteStatus?: CreditNoteStatus,
@Query() startDate?: Date,
@Query() endDate?: Date,
@Body() body?: {},
) {
const where = {
OR: queryOrNot<Prisma.CreditNoteWhereInput[]>(query, [
@ -218,6 +217,8 @@ export class CreditNoteController extends Controller {
const [result, total] = await prisma.$transaction([
prisma.creditNote.findMany({
where,
take: pageSize,
skip: (page - 1) * pageSize,
include: {
quotation: {
include: {