ProductStore, move API calls to separate file

This commit is contained in:
2024-09-18 15:59:16 +02:00
parent a254f99404
commit fbbfcdf365
8 changed files with 133 additions and 123 deletions

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)
}