summaryrefslogtreecommitdiff
path: root/src-migrate/services/promotionProgram.ts
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-08-02 03:25:54 +0000
committertrisusilo <tri.susilo@altama.co.id>2024-08-02 03:25:54 +0000
commit99a5965e1e5320e9acbc9718c3642ffae85bec57 (patch)
tree6a9aeca9b6833d7b87d0ea0a3d79d6bd15862751 /src-migrate/services/promotionProgram.ts
parent12c7841770052aefceda899db52b3e6b6d0b5e92 (diff)
parent35204954ac02efd1497715dec3d2695fdd7976f8 (diff)
Merged in Feature/all-promotion (pull request #202)
Feature/all promotion Approved-by: trisusilo
Diffstat (limited to 'src-migrate/services/promotionProgram.ts')
-rw-r--r--src-migrate/services/promotionProgram.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src-migrate/services/promotionProgram.ts b/src-migrate/services/promotionProgram.ts
index c8c46c65..8bf2a0bd 100644
--- a/src-migrate/services/promotionProgram.ts
+++ b/src-migrate/services/promotionProgram.ts
@@ -6,3 +6,11 @@ export const getPromotionProgram = async (
const url = `/api/promotion-program/${programId}`;
return await fetch(url).then((res) => res.json());
};
+
+export const getPromotionProgramSolr = async () => {
+ 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();
+};