Merge branch 'development' into 'devops-staging'

fix: product

See merge request empatnusabangsa/ppob/ppob-backend!12
This commit is contained in:
ilham dwi pratama 2021-12-10 04:08:56 +00:00
commit 7af9dca6c9

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,