This commit is contained in:
Team3
2026-05-29 17:58:43 +02:00
parent a826e9f6b3
commit 067d7229de
8 changed files with 183 additions and 14 deletions

View File

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