summaryrefslogtreecommitdiff
path: root/src/lib/merchant/api
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-05-23 09:38:22 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-05-23 09:38:22 +0700
commita2c424ebb371ce2716d7fc55bb70807303c2e0e0 (patch)
tree1a4bbbcf7cee381e10fa473926223abfe7c4bcf8 /src/lib/merchant/api
parent4904573845478e7e9648735d008153728870a123 (diff)
parent60cbad2ae4b551d8f1e6959a3c90134c16b10e26 (diff)
Merge branch 'new-release' of https://bitbucket.org/altafixco/next-indoteknik.giT into fix_responsive_cart
Diffstat (limited to 'src/lib/merchant/api')
-rw-r--r--src/lib/merchant/api/createMerchantApi.js14
-rw-r--r--src/lib/merchant/api/getMerchantApi.js13
-rw-r--r--src/lib/merchant/api/getMerchantProgresApi.js10
3 files changed, 37 insertions, 0 deletions
diff --git a/src/lib/merchant/api/createMerchantApi.js b/src/lib/merchant/api/createMerchantApi.js
new file mode 100644
index 00000000..4c4f96ba
--- /dev/null
+++ b/src/lib/merchant/api/createMerchantApi.js
@@ -0,0 +1,14 @@
+import odooApi from '@/core/api/odooApi';
+import { getAuth } from '@/core/utils/auth';
+
+const createMerchantApi = async ({ data }) => {
+ const auth = getAuth();
+ const lead = await odooApi(
+ 'POST',
+ `/api/v1/merchant/${auth.partnerId}`,
+ data
+ );
+ return lead;
+};
+
+export default createMerchantApi;
diff --git a/src/lib/merchant/api/getMerchantApi.js b/src/lib/merchant/api/getMerchantApi.js
new file mode 100644
index 00000000..a1a4f877
--- /dev/null
+++ b/src/lib/merchant/api/getMerchantApi.js
@@ -0,0 +1,13 @@
+import odooApi from '@/core/api/odooApi';
+import { getAuth } from '@/core/utils/auth';
+
+const createMerchantApi = async () => {
+ const auth = getAuth();
+ const lead = await odooApi(
+ 'GET',
+ `/api/v1/detail-merchant/${auth.partnerId}`
+ );
+ return lead;
+};
+
+export default createMerchantApi;
diff --git a/src/lib/merchant/api/getMerchantProgresApi.js b/src/lib/merchant/api/getMerchantProgresApi.js
new file mode 100644
index 00000000..d356ad78
--- /dev/null
+++ b/src/lib/merchant/api/getMerchantProgresApi.js
@@ -0,0 +1,10 @@
+import odooApi from '@/core/api/odooApi';
+import { getAuth } from '@/core/utils/auth';
+
+const createMerchantApi = async () => {
+ const auth = getAuth();
+ const lead = await odooApi('GET', `/api/v1/check-merchant/${auth.partnerId}`);
+ return lead;
+};
+
+export default createMerchantApi;