update: add no paginate to the user get

This commit is contained in:
Mahyargdz
2025-05-12 12:23:13 +03:30
parent e8402b673f
commit e3a75f16a0
6 changed files with 72 additions and 7 deletions
@@ -374,9 +374,14 @@ export class CustomersService {
/************************************************************ */
async getCustomers(queryDto: SearchCustomersDto) {
const [customers, count] = await this.userRepository.getCustomer(queryDto);
if (queryDto.paginate !== undefined && queryDto.paginate === 0) {
const customers = await this.userRepository.getCustomersWithoutPagination(queryDto);
return { customers };
} else {
const [customers, count] = await this.userRepository.getCustomer(queryDto);
return { customers, count };
return { customers, count };
}
}
/************************************************************ */