diff --git a/src/product/product.service.ts b/src/product/product.service.ts index 871a49b..ac5f9bb 100644 --- a/src/product/product.service.ts +++ b/src/product/product.service.ts @@ -46,6 +46,7 @@ export class ProductService { findAll(page) { return this.productRepository.findAndCount({ skip: page * 10, + relations: ['subCategories'], take: 10, order: { version: 'DESC', diff --git a/src/users/users.controller.ts b/src/users/users.controller.ts index f9f2387..dca7282 100644 --- a/src/users/users.controller.ts +++ b/src/users/users.controller.ts @@ -48,7 +48,7 @@ export class UsersController { @Get('find-by-supperior') async findBySuperrior(@Request() req, @Query('page') page: number) { return { - data: await this.usersService.findBySuperrior(req.user.id, page), + data: await this.usersService.findBySuperrior(req.user.userId, page), statusCode: HttpStatus.OK, message: 'success', }; diff --git a/src/users/users.service.ts b/src/users/users.service.ts index 96365c7..e7ff8c6 100644 --- a/src/users/users.service.ts +++ b/src/users/users.service.ts @@ -114,7 +114,6 @@ export class UsersService { where: { superior: superriorId, }, - relations: ['roles'], order: { updatedAt: 'DESC', },