mirror of
https://github.com/TheRealOwenRees/chess-scribe-website.git
synced 2026-07-23 01:46:57 +00:00
change response on access token delete function
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user