feat: implement partner licenses module with pagination and filtering capabilities
This commit is contained in:
@@ -8,13 +8,13 @@ export class AdminUsersService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async findAll() {
|
||||
const [users, count] = await this.prisma.$transaction([
|
||||
const [users, total] = await this.prisma.$transaction([
|
||||
this.prisma.admin.findMany(),
|
||||
this.prisma.admin.count(),
|
||||
])
|
||||
return ResponseMapper.paginate(
|
||||
users.map(user => ({ ...user, fullname: `${user.first_name} ${user.last_name}` })),
|
||||
{ count },
|
||||
{ total },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user