This commit is contained in:
team3
2026-06-18 14:30:21 +02:00
parent d8932c90d6
commit 9c0f622e0c
30 changed files with 45808 additions and 217 deletions

View File

@@ -124,6 +124,30 @@ export async function fetchProjects() {
return res.json()
}
export async function fetchFolders(kind) {
const res = await fetch(`${BASE}/folders?kind=${encodeURIComponent(kind)}`)
return jsonOrThrow(res)
}
export async function fetchQuelle(topic) {
const res = await fetch(`${BASE}/bausteine/quelle?topic=${encodeURIComponent(topic)}`)
return jsonOrThrow(res)
}
export async function updateQuelle(topic, { type, ort = '', spec = '' }) {
const res = await fetch(`${BASE}/bausteine/quelle`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ topic, type, ort, spec }),
})
return jsonOrThrow(res)
}
export async function fetchBausteineUebersicht(topic) {
const res = await fetch(`${BASE}/bausteine/uebersicht?topic=${encodeURIComponent(topic)}`)
return jsonOrThrow(res)
}
export async function deleteProject(name) {
await fetch(`${BASE}/projects/${encodeURIComponent(name)}`, { method: 'DELETE' })
}