@infrab4a/connect 5.4.0-beta.5 → 5.4.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +3 -6
- package/index.esm.js +3 -6
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3392,8 +3392,6 @@ class HasuraQueryBuilderHelper {
|
|
|
3392
3392
|
class HasuraRequestHelper {
|
|
3393
3393
|
static async fetch(params) {
|
|
3394
3394
|
const { variables, query, endpoint, headers, logger } = params;
|
|
3395
|
-
console.warn('variables', variables);
|
|
3396
|
-
console.warn('query', query);
|
|
3397
3395
|
const request = {
|
|
3398
3396
|
url: endpoint,
|
|
3399
3397
|
method: 'POST',
|
|
@@ -8016,6 +8014,9 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
8016
8014
|
const result = await this.find({
|
|
8017
8015
|
filters: {
|
|
8018
8016
|
slug,
|
|
8017
|
+
productId: {
|
|
8018
|
+
operator: exports.Where.ISNULL,
|
|
8019
|
+
},
|
|
8019
8020
|
},
|
|
8020
8021
|
fields: this.fields.map((field) => typeof field === 'string' ? field : Object.keys(field).shift()),
|
|
8021
8022
|
options: {
|
|
@@ -8025,11 +8026,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
8025
8026
|
if (!result.data.length)
|
|
8026
8027
|
return null;
|
|
8027
8028
|
const product = result?.data?.shift();
|
|
8028
|
-
if (product.productId) ;
|
|
8029
|
-
console.warn('product getBySlug', product);
|
|
8030
|
-
console.warn('vai entrar', !product.reviews.length && product.rate > 0);
|
|
8031
8029
|
if (!product.reviews.length && product.rate > 0) {
|
|
8032
|
-
console.warn('entrou');
|
|
8033
8030
|
product.reviews = await this.findReviewsByProduct((product.productId ? product.productId : product.id), true);
|
|
8034
8031
|
}
|
|
8035
8032
|
RoundProductPricesHelper.roundProductPrices(product);
|
package/index.esm.js
CHANGED
|
@@ -3368,8 +3368,6 @@ class HasuraQueryBuilderHelper {
|
|
|
3368
3368
|
class HasuraRequestHelper {
|
|
3369
3369
|
static async fetch(params) {
|
|
3370
3370
|
const { variables, query, endpoint, headers, logger } = params;
|
|
3371
|
-
console.warn('variables', variables);
|
|
3372
|
-
console.warn('query', query);
|
|
3373
3371
|
const request = {
|
|
3374
3372
|
url: endpoint,
|
|
3375
3373
|
method: 'POST',
|
|
@@ -7992,6 +7990,9 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
7992
7990
|
const result = await this.find({
|
|
7993
7991
|
filters: {
|
|
7994
7992
|
slug,
|
|
7993
|
+
productId: {
|
|
7994
|
+
operator: Where.ISNULL,
|
|
7995
|
+
},
|
|
7995
7996
|
},
|
|
7996
7997
|
fields: this.fields.map((field) => typeof field === 'string' ? field : Object.keys(field).shift()),
|
|
7997
7998
|
options: {
|
|
@@ -8001,11 +8002,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
8001
8002
|
if (!result.data.length)
|
|
8002
8003
|
return null;
|
|
8003
8004
|
const product = result?.data?.shift();
|
|
8004
|
-
if (product.productId) ;
|
|
8005
|
-
console.warn('product getBySlug', product);
|
|
8006
|
-
console.warn('vai entrar', !product.reviews.length && product.rate > 0);
|
|
8007
8005
|
if (!product.reviews.length && product.rate > 0) {
|
|
8008
|
-
console.warn('entrou');
|
|
8009
8006
|
product.reviews = await this.findReviewsByProduct((product.productId ? product.productId : product.id), true);
|
|
8010
8007
|
}
|
|
8011
8008
|
RoundProductPricesHelper.roundProductPrices(product);
|