update
This commit is contained in:
@@ -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`, {
|
||||
|
||||
Reference in New Issue
Block a user