diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-07-10 16:23:35 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-07-10 16:23:35 +0700 |
| commit | a8dcd4d3d14d9caf64063f3ec586125238727794 (patch) | |
| tree | 943ad4a0bcd25153ace381075f95ab0aec4a2edf /src/api | |
| parent | 2e3c726bc8217f3960cfecec44b81303b03de72b (diff) | |
| parent | ffaf9994e8c47c5a32a2091b7d0949302528ee2e (diff) | |
Merge branch 'feature/all-promotion' into development
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/promoApi.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/promoApi.js b/src/api/promoApi.js index 0e82c8b9..967aeab2 100644 --- a/src/api/promoApi.js +++ b/src/api/promoApi.js @@ -13,11 +13,13 @@ 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 sort ='sort=if(exists(sequence_i),0,1) asc, sequence_i asc, if(exists(total_qty_sold_f), total_qty_sold_f, -1) desc'; 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}&${sort}`); |
