diff --git a/src/users/users.controller.ts b/src/users/users.controller.ts index dca7282..addb15e 100644 --- a/src/users/users.controller.ts +++ b/src/users/users.controller.ts @@ -47,8 +47,13 @@ export class UsersController { @Get('find-by-supperior') async findBySuperrior(@Request() req, @Query('page') page: number) { + const [data, count] = await this.usersService.findBySuperrior( + req.user.userId, + page, + ); return { - data: await this.usersService.findBySuperrior(req.user.userId, page), + data, + count, statusCode: HttpStatus.OK, message: 'success', }; @@ -59,8 +64,10 @@ export class UsersController { @Param('id', ParseUUIDPipe) id: string, @Query('page') page: number, ) { + const [data, count] = await this.usersService.findByRoles(id, page); return { - data: await this.usersService.findByRoles(id, page), + data, + count, statusCode: HttpStatus.OK, message: 'success', };