This commit is contained in:
team3
2026-06-24 11:56:12 +02:00
parent e985f07696
commit caa9314de5
15 changed files with 391 additions and 23 deletions

View File

@@ -152,6 +152,24 @@ export async function fetchGuideContent(id) {
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`, {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ baustein, stelle, block, hinweis, provider }),
})
return jsonOrThrow(res)
}
// Geprüften Block persistent übernehmen (alt → neu im jeweiligen Feld).
export async function uebernehmeBlock(id, { baustein, stelle, alt, neu, provider }) {
const res = await fetch(`${BASE}/guides/${id}/block/uebernehmen`, {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ baustein, stelle, alt, neu, provider }),
})
return jsonOrThrow(res)
}
export async function fetchTopics() {
const res = await fetch(`${BASE}/topics`)
return res.json()