This commit is contained in:
Team3
2026-05-28 22:38:01 +02:00
parent 4594c2e372
commit 96536498d0
7 changed files with 219 additions and 48 deletions

View File

@@ -62,6 +62,14 @@ export async function deleteBaustein(id) {
await fetch(`${BASE}/bausteine/${id}`, { method: 'DELETE' })
}
export async function reworkBaustein(id, instructions) {
await fetch(`${BASE}/bausteine/${id}/rework`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ instructions }),
})
}
export async function fetchSuggestions(topic) {
const res = await fetch(`${BASE}/bausteine/suggestions?topic=${encodeURIComponent(topic)}`)
return res.json()