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/api/shop/search.js | |
| parent | a1e4d12c041dc8f06de531a9f7f287e07ccc81e8 (diff) | |
<iman> delete console log
Diffstat (limited to 'src/pages/api/shop/search.js')
| -rw-r--r-- | src/pages/api/shop/search.js | 9 |
1 files changed, 1 insertions, 8 deletions
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('&') ); |
