docker composed

This commit is contained in:
2026-10-08 00:26:42 +03:00
parent 86bcd5b141
commit 728d342a89
14 changed files with 360 additions and 27 deletions
+7 -3
View File
@@ -1,8 +1,12 @@
// Базовый URL API. Если фронт и бэк на одном домене, можно использовать '' или '/api'
const API_BASE = 'http://localhost:8000';
// frontend/js/api.js
import { apiFetch } from "./auth.js";
import { API_BASE } from "./config.js"; // <-- Добавили импорт
// УДАЛИТЬ эти строки из начала api.js:
// export const API_BASE = ...
export async function fetchWorkoutTypes() {
const res = await fetch(`${API_BASE}/workout-types/`);
const res = await apiFetch("/workout-types/");
if (!res.ok) throw new Error('Failed to fetch workout types');
return await res.json();
}