This commit is contained in:
team3
2026-06-24 21:27:11 +02:00
parent c802c7fd02
commit e0f1b59707
5 changed files with 57 additions and 5 deletions

View File

@@ -170,6 +170,14 @@ export async function uebernehmeBlock(id, { baustein, stelle, alt, neu, provider
return jsonOrThrow(res)
}
// Lern-Fortschritt eines Bausteins auf null setzen (Score/Streak/Flags/offene Frage).
export async function resetBausteinFortschritt(topic, baustein) {
const res = await fetch(`${BASE}/bausteine/fortschritt?topic=${encodeURIComponent(topic)}&baustein=${encodeURIComponent(baustein)}`, {
method: 'DELETE',
})
return jsonOrThrow(res)
}
export async function fetchTopics() {
const res = await fetch(`${BASE}/topics`)
return res.json()