summaryrefslogtreecommitdiff
path: root/src-migrate/services/promotionProgram.ts
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-07-15 03:12:14 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-07-15 03:12:14 +0000
commitd78382beb19a1d3714d1c203f933393c702e7369 (patch)
treedd03e14608025d6fbce36c675cff44aac93a815e /src-migrate/services/promotionProgram.ts
parent69e28c2346b8cf9537fe439f40dc05f820751ff4 (diff)
parentc81465a639ae63e93f7f42e4c345e83db720bf68 (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.ts9
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();
+};