update: add no paginate to the user get
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************ */
|
||||
|
||||
Reference in New Issue
Block a user