ProductStore, move API calls to separate file

This commit is contained in:
tobias committed 2024-09-18 15:59:16 +02:00
1 parent 2847bd940f
commit 9ee344f45f
8 files changed
+133 -123

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import axios from "axios"
let BASE_URL = "http://localhost:3000/products"
/**
* Fetch all products from API
*/
export async function getAllProducts() {
return await axios.get(BASE_URL)
}