fix: product
This commit is contained in:
@@ -46,7 +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'],
|
relations: ['sub_categories'],
|
||||||
take: 10,
|
take: 10,
|
||||||
order: {
|
order: {
|
||||||
version: 'DESC',
|
version: 'DESC',
|
||||||
@@ -57,8 +57,8 @@ export class ProductService {
|
|||||||
findAllByCategories(page, categories) {
|
findAllByCategories(page, categories) {
|
||||||
return this.productRepository.findAndCount({
|
return this.productRepository.findAndCount({
|
||||||
join: {
|
join: {
|
||||||
alias: 'subCategories',
|
alias: 'sub_categories',
|
||||||
innerJoin: { subCategories: 'roles.users' },
|
innerJoin: { sub_categories: 'roles.users' },
|
||||||
},
|
},
|
||||||
skip: page * 10,
|
skip: page * 10,
|
||||||
take: 10,
|
take: 10,
|
||||||
|
|||||||
Reference in New Issue
Block a user