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);
}
export function deleteLesson(
id: number,
): Promise<{ deleted: number; deleted_batch_id: string }> {
return apiDelete<{ deleted: number; deleted_batch_id: string }>(
`/api/lessons/${id}`,
);
/** Trash, not erase — recoverable. `apiDelete` discards the body, which is the
* established shape here (snippets delete the same way): the batch id is in
* the response, but no caller has needed it and inventing a second delete
* helper to carry it would be the duplication, not the feature. */
export function deleteLesson(id: number): Promise<void> {
return apiDelete(`/api/lessons/${id}`);
}
/** The lessons drawn FROM one record — the reverse of `learned_from`.