Merge branch 'development' into 'devops-staging'
add: relation See merge request empatnusabangsa/ppob/ppob-backend!8
This commit is contained in:
		| @@ -46,6 +46,7 @@ export class ProductService { | |||||||
|   findAll(page) { |   findAll(page) { | ||||||
|     return this.productRepository.findAndCount({ |     return this.productRepository.findAndCount({ | ||||||
|       skip: page * 10, |       skip: page * 10, | ||||||
|  |       relations: ['subCategories'], | ||||||
|       take: 10, |       take: 10, | ||||||
|       order: { |       order: { | ||||||
|         version: 'DESC', |         version: 'DESC', | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ export class UsersController { | |||||||
|   @Get('find-by-supperior') |   @Get('find-by-supperior') | ||||||
|   async findBySuperrior(@Request() req, @Query('page') page: number) { |   async findBySuperrior(@Request() req, @Query('page') page: number) { | ||||||
|     return { |     return { | ||||||
|       data: await this.usersService.findBySuperrior(req.user.id, page), |       data: await this.usersService.findBySuperrior(req.user.userId, page), | ||||||
|       statusCode: HttpStatus.OK, |       statusCode: HttpStatus.OK, | ||||||
|       message: 'success', |       message: 'success', | ||||||
|     }; |     }; | ||||||
|   | |||||||
| @@ -114,7 +114,6 @@ export class UsersService { | |||||||
|       where: { |       where: { | ||||||
|         superior: superriorId, |         superior: superriorId, | ||||||
|       }, |       }, | ||||||
|       relations: ['roles'], |  | ||||||
|       order: { |       order: { | ||||||
|         updatedAt: 'DESC', |         updatedAt: 'DESC', | ||||||
|       }, |       }, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user