summaryrefslogtreecommitdiff
path: root/src/lib/promotinProgram/api/homepageApi.js
diff options
context:
space:
mode:
authortrisusilo <tri.susilo@altama.co.id>2023-07-24 03:32:03 +0000
committertrisusilo <tri.susilo@altama.co.id>2023-07-24 03:32:03 +0000
commit4fcb73a336a6025a0ead194b317543efcd4f0e4b (patch)
tree20ea651ea2c02be2bae2c2915ca5ab7ff2f95538 /src/lib/promotinProgram/api/homepageApi.js
parentd61b3ca0213395099e4cea9ace8172d4e622fb52 (diff)
parent984f1b13b408ee9652072392d6312d609b353315 (diff)
Merged in Feature/promotion_programvaoucher (pull request #15)
Feature/promotion programvaoucher
Diffstat (limited to 'src/lib/promotinProgram/api/homepageApi.js')
-rw-r--r--src/lib/promotinProgram/api/homepageApi.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/promotinProgram/api/homepageApi.js b/src/lib/promotinProgram/api/homepageApi.js
new file mode 100644
index 00000000..496af9d6
--- /dev/null
+++ b/src/lib/promotinProgram/api/homepageApi.js
@@ -0,0 +1,17 @@
+import odooApi from "@/core/api/odooApi"
+
+export const getPromotionHome = async () => {
+ const response = await odooApi('GET', '/api/v1/promotion/home')
+ return response
+}
+
+export const getProductPromotionHome = async ({id}) => {
+ const response = await odooApi('GET', `/api/v1/promotion/home/${id}`)
+ return response
+}
+
+export const getPromotionProgram = async ({ id }) => {
+ const listProgram = await odooApi('GET', `/api/v1/product_variant/${id}/promotions`)
+
+ return listProgram
+} \ No newline at end of file