update
This commit is contained in:
@@ -66,18 +66,18 @@ export async function fetchBausteinLernstand(topic) {
|
||||
return jsonOrThrow(res)
|
||||
}
|
||||
|
||||
export async function fetchVertiefung(topic, baustein) {
|
||||
export async function fetchVertiefung(topic, baustein, art = 'vertiefung') {
|
||||
const res = await fetch(
|
||||
`${BASE}/bausteine/vertiefung?topic=${encodeURIComponent(topic)}&baustein=${encodeURIComponent(baustein)}`
|
||||
`${BASE}/bausteine/vertiefung?topic=${encodeURIComponent(topic)}&baustein=${encodeURIComponent(baustein)}&art=${art}`
|
||||
)
|
||||
return jsonOrThrow(res)
|
||||
}
|
||||
|
||||
export async function createVertiefung({ topic, baustein, section, provider }) {
|
||||
export async function createVertiefung({ topic, baustein, section, art = 'vertiefung', provider }) {
|
||||
const res = await fetch(`${BASE}/bausteine/vertiefung`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ topic, baustein, section, provider }),
|
||||
body: JSON.stringify({ topic, baustein, section, art, provider }),
|
||||
})
|
||||
return jsonOrThrow(res)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user