From 11324bc4fd139d9e400b9d3b34e9735f1b167ec9 Mon Sep 17 00:00:00 2001 From: Sanket74995 Date: Wed, 1 Jul 2026 21:24:09 +0530 Subject: [PATCH] Add goal icon support and tests --- src/api/lib.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/lib.ts b/src/api/lib.ts index 3c593ca..749e9da 100644 --- a/src/api/lib.ts +++ b/src/api/lib.ts @@ -45,8 +45,8 @@ export async function createGoal(): Promise { export async function updateGoal(goalId: string, updatedGoal: Goal): Promise { try { - await axios.put(`${API_ROOT}/api/Goal/${goalId}`, updatedGoal) - return true + const response = await axios.put(`${API_ROOT}/api/Goal/${goalId}`, updatedGoal) + return response.status >= 200 && response.status < 300 } catch (error: any) { return false }