change response on access token delete function

This commit is contained in:
2026-06-10 12:11:57 +02:00
parent ed820b7fd1
commit 80c2cce4de
2 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -117,8 +117,14 @@ const deleteAccessToken = createServerFn().handler(async () => {
},
});
return await response.json();
if (!response.ok) {
throw new Error(`Failed to delete access token: ${response.statusText}`);
}
return { success: true };
}
return { success: false, message: "No token found to delete." };
});
export const logout = createServerFn().handler(async () => {