few fixes
categories are now pulled from backend
This commit is contained in:
14
ArtisanConnect/api/categories.jsx
Normal file
14
ArtisanConnect/api/categories.jsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import axios from "axios";
|
||||
|
||||
// const API_URL = "https://testowe.zikor.pl/api/v1";
|
||||
const API_URL = "http://10.224.1.86:8080/api/v1";
|
||||
|
||||
export async function listCategories() {
|
||||
try {
|
||||
const response = await axios.get(`${API_URL}/vars/categories`);
|
||||
console.log("Response", response.data, "status code: ", response.status);
|
||||
return response.data;
|
||||
} catch (err) {
|
||||
console.error("Nie udało się pobrać listy kategorii.", err.response.status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user