mirror of
https://github.com/lordmathis/lemma.git
synced 2025-12-24 02:24:25 +00:00
Fix async handling for API response in updateProfile and workspace functions
This commit is contained in:
@@ -15,7 +15,7 @@ export const updateProfile = async (
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(updateRequest),
|
||||
});
|
||||
const data: unknown = response.json();
|
||||
const data: unknown = await response.json();
|
||||
|
||||
if (!isUser(data)) {
|
||||
throw new Error('Invalid user data');
|
||||
|
||||
Reference in New Issue
Block a user