fix: product

This commit is contained in:
ilham 2021-12-10 11:08:03 +07:00
parent 64e73813fa
commit d36de7d966

View File

@ -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,