First commit: ready to implement features

This commit is contained in:
litoral05
2026-05-05 17:15:09 +01:00
commit abaa40790c
41 changed files with 7885 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
const API_BASE = import.meta.env.VITE_API_BASE;
const API_KEY = import.meta.env.VITE_API_KEY;
export async function apiGet<T>(path: string): Promise<T> {
const response = await fetch(`${API_BASE}${path}`, {
headers: {
"X-API-Key": API_KEY,
},
});
if (!response.ok) {
throw new Error(`API error ${response.status}`);
}
return response.json();
}