This commit is contained in:
2026-06-16 10:05:23 -06:00
parent fb0b8d11c9
commit 33d5bfd8e9
2 changed files with 12 additions and 4 deletions

View File

@@ -50,8 +50,8 @@ export function deleteBook(id: string): Promise<{ ok: true }> {
return authedFetch(`/api/books/${id}`, { method: 'DELETE' })
}
export function generateLesson(topic: string): Promise<GenerateResult> {
return authedFetch('/api/generate', { method: 'POST', body: JSON.stringify({ topic }) })
export function generateLesson(topic: string, signal?: AbortSignal): Promise<GenerateResult> {
return authedFetch('/api/generate', { method: 'POST', body: JSON.stringify({ topic }), signal })
}
export function generateOutline(theme: string): Promise<{ titles: string[] }> {