fix(todos): deleteTodo utilise handleResponse pour cohérence

This commit is contained in:
2026-05-24 12:06:34 +02:00
parent e89d2ff4f1
commit eea004f53b
+1 -1
View File
@@ -88,7 +88,7 @@ export async function updateTodo(id: string, data: TodoUpdate): Promise<Todo> {
export async function deleteTodo(id: string): Promise<void> {
const res = await fetch(`${BASE}/${id}`, { method: 'DELETE' })
if (!res.ok) throw new Error(`${res.status} ${res.statusText}`)
await handleResponse<void>(res)
}
export async function postponeTodo(id: string, days: 1 | 7): Promise<Todo> {