feat: implement partner licenses module with pagination and filtering capabilities
This commit is contained in:
@@ -46,14 +46,14 @@ export class AdminConsumersService {
|
||||
}
|
||||
|
||||
async findAll() {
|
||||
const [consumers, count] = await this.prisma.$transaction([
|
||||
const [consumers, total] = await this.prisma.$transaction([
|
||||
this.prisma.consumer.findMany({
|
||||
select: this.defaultSelect,
|
||||
}),
|
||||
this.prisma.consumer.count(),
|
||||
])
|
||||
|
||||
return ResponseMapper.paginate(consumers.map(mapConsumerWithLicenseUtil), { count })
|
||||
return ResponseMapper.paginate(consumers.map(mapConsumerWithLicenseUtil), { total })
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user