diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-19 10:50:07 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-19 10:50:07 +0700 |
| commit | 9f10b502da7e1d102ddb0b16175b828834ff6f44 (patch) | |
| tree | 39326387686a77c73fabba133101d0cb7afc989e /src/pages | |
| parent | a1e4d12c041dc8f06de531a9f7f287e07ccc81e8 (diff) | |
<iman> delete console log
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/api/page-content.js | 1 | ||||
| -rw-r--r-- | src/pages/api/shop/search.js | 9 |
2 files changed, 1 insertions, 9 deletions
diff --git a/src/pages/api/page-content.js b/src/pages/api/page-content.js index 3cb8a237..a6514505 100644 --- a/src/pages/api/page-content.js +++ b/src/pages/api/page-content.js @@ -22,7 +22,6 @@ export default async function handler(req, res) { if (!cachedData) { const items = await getPageContent({ path }); - console.log('items', items); await client.set( `page-content:${path}`, JSON.stringify(items), diff --git a/src/pages/api/shop/search.js b/src/pages/api/shop/search.js index 65927bbc..63ec7ca0 100644 --- a/src/pages/api/shop/search.js +++ b/src/pages/api/shop/search.js @@ -19,12 +19,7 @@ export default async function handler(req, res) { source = '', } = req.query; - - - console.log('fq new', fq); - let { stock = '' } = req.query; - let paramOrderBy = ''; switch (orderBy) { case 'flashsale-discount-desc': @@ -93,7 +88,6 @@ export default async function handler(req, res) { 'price_tier1_v2_f:[1 TO *]', ]; - if (fq && source != 'similar' && typeof fq != 'string') { // filterQueries.push(fq); fq.push(...filterQueries); @@ -103,7 +97,7 @@ export default async function handler(req, res) { let keywords = newQ; if (source === 'similar' || checkQ.length < 3) { if (checkQ.length < 2 || checkQ[1].length < 2) { - keywords = newQ ; + keywords = newQ; } else { keywords = newQ + '*'; } @@ -170,7 +164,6 @@ export default async function handler(req, res) { parameter = parameter.concat( fq.map((val) => `fq=${encodeURIComponent(val)}`) ); - let result = await axios( process.env.SOLR_HOST + '/solr/product/select?' + parameter.join('&') ); |
