aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-10-16 16:18:59 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-10-16 16:18:59 +0530
commit06c426d7a1afbe37cb3e8bac63c136fe54dc2f04 (patch)
tree9dac8f967a5fa494329805b2eda4f5199193d594 /src
parentc2b05c2ceca525de0382ed1133930f99cc5db33f (diff)
downloadmall-app-06c426d7a1afbe37cb3e8bac63c136fe54dc2f04.tar.gz
mall-app-06c426d7a1afbe37cb3e8bac63c136fe54dc2f04.tar.bz2
mall-app-06c426d7a1afbe37cb3e8bac63c136fe54dc2f04.zip
Add productService to fetch and manage product data
Diffstat (limited to 'src')
-rw-r--r--src/services/productService.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/services/productService.js b/src/services/productService.js
new file mode 100644
index 0000000..4c0ea92
--- /dev/null
+++ b/src/services/productService.js
@@ -0,0 +1,5 @@
+import axios from 'axios';
+
+const API_URL = 'https://yourapi.com/api/products';
+
+export const fetchProduct = (barcode) => axios.get(`${API_URL}/${barcode}`);