few fixes

categories are now pulled from backend
This commit is contained in:
2025-05-05 10:13:06 +02:00
parent 05916b959c
commit 0a7be2e27b
4 changed files with 43 additions and 6 deletions

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