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