I believe most errors are fixed. Rewrite is basically complete
This commit is contained in:
@ -134,6 +134,10 @@ export const updateRelationshipStatus = async (userId: number, status: 'accepted
|
||||
}),
|
||||
});
|
||||
if (!response.ok) {
|
||||
if (status === 'rejected') {
|
||||
console.log('Relationship deleted.');
|
||||
return null;
|
||||
}
|
||||
throw new Error(
|
||||
`Error updating relationship status: ${response.status} ${response.statusText}`
|
||||
);
|
||||
|
Reference in New Issue
Block a user