This commit is contained in:
team3
2026-06-27 00:58:46 +02:00
parent 2a2026c9ae
commit f018ca5048
44 changed files with 3070 additions and 379 deletions

View File

@@ -146,12 +146,19 @@ export async function deleteGuide(id, slots = false) {
await fetch(`${BASE}/guides/${id}${slots ? '?slots=1' : ''}`, { method: 'DELETE' })
}
export async function fetchGuideContent(id) {
const res = await fetch(`${BASE}/guides/${id}/content`)
export async function fetchGuideContent(id, ebene = 4) {
const res = await fetch(`${BASE}/guides/${id}/content?ebene=${ebene}`)
if (!res.ok) throw new Error(`Inhalt nicht verfügbar (${res.status})`)
return res.json()
}
// Lern-Artefakte (Karteikarten/Beispiele/Diagramme) je Thema, gruppiert nach Baustein-Norm.
export async function fetchArtefakte(topic) {
const res = await fetch(`${BASE}/bausteine/artefakte?topic=${encodeURIComponent(topic)}`)
if (!res.ok) return { artefakte: {} }
return res.json()
}
// Einen Markdown-Block on-demand gegen die Guide-Regeln prüfen (Fokus, Rechtsklick).
export async function pruefeBlock(id, { baustein, stelle, block, hinweis = '', provider }) {
const res = await fetch(`${BASE}/guides/${id}/block/pruefen`, {