diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-06-21 15:31:12 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-06-21 15:31:12 +0700 |
| commit | 3ada88f0faf901e05bd56ecff8c4bcb209c06787 (patch) | |
| tree | 789d149b4c7bf6822ab13d38668d6f16b6354a45 /src/api | |
| parent | 7b08c9358888148bf6f6c2c7145d75e466550298 (diff) | |
<iman> update all-promotion
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/promoApi.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/api/promoApi.js b/src/api/promoApi.js index 4c386fba..95a27fd3 100644 --- a/src/api/promoApi.js +++ b/src/api/promoApi.js @@ -13,13 +13,14 @@ export const fetchPromoItems = async (type) => { } }; -export const fetchPromoItemsSolr = async (type) => { +export const fetchPromoItemsSolr = async (type, start, rows) => { // let query = type ? `type_value_s:${type}` : '*:*'; - let start = 0 - let rows = 100 + // let start = 0 + // let rows = 10 try { const queryParams = new URLSearchParams({ q: type }); const response = await fetch(`/solr/promotion_program_lines/select?${queryParams.toString()}&rows=${rows}&start=${start}`); + console.log("URL",`/solr/promotion_program_lines/select?${queryParams.toString()}&rows=${rows}&start=${start}`) if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } |
