diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-07-15 03:12:14 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-07-15 03:12:14 +0000 |
| commit | d78382beb19a1d3714d1c203f933393c702e7369 (patch) | |
| tree | dd03e14608025d6fbce36c675cff44aac93a815e /src-migrate/services/promotionProgram.ts | |
| parent | 69e28c2346b8cf9537fe439f40dc05f820751ff4 (diff) | |
| parent | c81465a639ae63e93f7f42e4c345e83db720bf68 (diff) | |
Merged in Feature/all-promotion (pull request #164)
Feature/all promotion
Diffstat (limited to 'src-migrate/services/promotionProgram.ts')
| -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(); +}; |
