ProductStore, move API calls to separate file
This commit is contained in:
1 parent
2847bd940f
commit
9ee344f45f
8 files changed
+133
-123
No files matched your search
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user