diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-07-13 10:37:34 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-07-13 10:37:34 +0700 |
| commit | 3fe75f5dcaf75e71d29d50f3fb0aa1b5fb443224 (patch) | |
| tree | f35ba29c86893f42768348fb498c4901cb406cea /src-migrate/services | |
| parent | 46769b859bb56807d47053c3b99810455db12803 (diff) | |
<iman> update revisi banner all promotion
Diffstat (limited to 'src-migrate/services')
| -rw-r--r-- | src-migrate/services/promotionProgram.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src-migrate/services/promotionProgram.ts b/src-migrate/services/promotionProgram.ts index c8c46c65..92c60943 100644 --- a/src-migrate/services/promotionProgram.ts +++ b/src-migrate/services/promotionProgram.ts @@ -6,3 +6,12 @@ export const getPromotionProgram = async ( const url = `/api/promotion-program/${programId}`; return await fetch(url).then((res) => res.json()); }; + +export const getPromotionProgramSolr = async () => { + console.log(`/solr/promotion-program/select?q=*:*`) + const response = await fetch(`/solr/promotion_programs/select?indent=true&q.op=OR&q=*:*&fq=banner_s:[* TO *]`); + if (!response.ok) { + throw new Error('Network response was not ok'); + } + return response.json(); +}; |
