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