Lessons step 7 — a lesson is readable, writable and browsable by a human (#3734) #169

Merged
bvandeusen merged 4 commits from dev into main 2026-09-19 16:12:39 -04:00
Showing only changes of commit 1c438b27e2 - Show all commits
+6 -6
View File
@@ -124,12 +124,12 @@ export function updateLesson(
return apiPatch<Lesson>(`/api/lessons/${id}`, payload); return apiPatch<Lesson>(`/api/lessons/${id}`, payload);
} }
export function deleteLesson( /** Trash, not erase — recoverable. `apiDelete` discards the body, which is the
id: number, * established shape here (snippets delete the same way): the batch id is in
): Promise<{ deleted: number; deleted_batch_id: string }> { * the response, but no caller has needed it and inventing a second delete
return apiDelete<{ deleted: number; deleted_batch_id: string }>( * helper to carry it would be the duplication, not the feature. */
`/api/lessons/${id}`, export function deleteLesson(id: number): Promise<void> {
); return apiDelete(`/api/lessons/${id}`);
} }
/** The lessons drawn FROM one record — the reverse of `learned_from`. /** The lessons drawn FROM one record — the reverse of `learned_from`.