add: relation
This commit is contained in:
parent
1e0be3dc48
commit
6360b92bf8
|
@ -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',
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user