fix: missing prisma query take and skip
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 15s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 15s
This commit is contained in:
parent
16c4c64c89
commit
cef26278ba
1 changed files with 2 additions and 1 deletions
|
|
@ -156,7 +156,6 @@ export class CreditNoteController extends Controller {
|
||||||
@Query() creditNoteStatus?: CreditNoteStatus,
|
@Query() creditNoteStatus?: CreditNoteStatus,
|
||||||
@Query() startDate?: Date,
|
@Query() startDate?: Date,
|
||||||
@Query() endDate?: Date,
|
@Query() endDate?: Date,
|
||||||
@Body() body?: {},
|
|
||||||
) {
|
) {
|
||||||
const where = {
|
const where = {
|
||||||
OR: queryOrNot<Prisma.CreditNoteWhereInput[]>(query, [
|
OR: queryOrNot<Prisma.CreditNoteWhereInput[]>(query, [
|
||||||
|
|
@ -218,6 +217,8 @@ export class CreditNoteController extends Controller {
|
||||||
const [result, total] = await prisma.$transaction([
|
const [result, total] = await prisma.$transaction([
|
||||||
prisma.creditNote.findMany({
|
prisma.creditNote.findMany({
|
||||||
where,
|
where,
|
||||||
|
take: pageSize,
|
||||||
|
skip: (page - 1) * pageSize,
|
||||||
include: {
|
include: {
|
||||||
quotation: {
|
quotation: {
|
||||||
include: {
|
include: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue