feat: add page size in all the rest API
This commit is contained in:
		| @@ -1,10 +1,4 @@ | ||||
| import { | ||||
|   forwardRef, | ||||
|   HttpException, | ||||
|   HttpStatus, | ||||
|   Inject, | ||||
|   Injectable, | ||||
| } from '@nestjs/common'; | ||||
| import { forwardRef, HttpException, HttpStatus, Inject, Injectable } from '@nestjs/common'; | ||||
| import { InjectRepository } from '@nestjs/typeorm'; | ||||
| import { Connection, Not, Repository } from 'typeorm'; | ||||
| import { CoaService } from '../../transaction/coa.service'; | ||||
| @@ -135,10 +129,10 @@ export class PartnerService { | ||||
|     return partnerData; | ||||
|   }; | ||||
|  | ||||
|   findAllPartner(page) { | ||||
|   findAllPartner(page, pageSize?) { | ||||
|     return this.partnerRepository.findAndCount({ | ||||
|       skip: page * 10, | ||||
|       take: 10, | ||||
|       skip: page * (pageSize || 10), | ||||
|       take: pageSize || 10, | ||||
|       order: { | ||||
|         version: 'DESC', | ||||
|       }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user