From eea004f53b4f8fa795e2d6e02232fe35813b0b1c Mon Sep 17 00:00:00 2001 From: Gilles Soulier Date: Sun, 24 May 2026 12:06:34 +0200 Subject: [PATCH] =?UTF-8?q?fix(todos):=20deleteTodo=20utilise=20handleResp?= =?UTF-8?q?onse=20pour=20coh=C3=A9rence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/todos.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/api/todos.ts b/frontend/src/api/todos.ts index 9720724..2f9c690 100644 --- a/frontend/src/api/todos.ts +++ b/frontend/src/api/todos.ts @@ -88,7 +88,7 @@ export async function updateTodo(id: string, data: TodoUpdate): Promise { export async function deleteTodo(id: string): Promise { const res = await fetch(`${BASE}/${id}`, { method: 'DELETE' }) - if (!res.ok) throw new Error(`${res.status} ${res.statusText}`) + await handleResponse(res) } export async function postponeTodo(id: string, days: 1 | 7): Promise {