Lessons step 7 — a lesson is readable, writable and browsable by a human (#3734) #169
@@ -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`.
|
||||||
|
|||||||
Reference in New Issue
Block a user