From 06c426d7a1afbe37cb3e8bac63c136fe54dc2f04 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Wed, 16 Oct 2024 16:18:59 +0530 Subject: Add productService to fetch and manage product data --- src/services/productService.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/services/productService.js (limited to 'src') 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}`); -- cgit v1.2.3-59-g8ed1b