Skip to content
Snippets Groups Projects
Commit 883cfcc1 authored by Matt Kirby's avatar Matt Kirby
Browse files

Cannot delete friends which arent friends

parent c3597a88
No related branches found
No related tags found
1 merge request!15Add Friend service
......@@ -16,6 +16,11 @@ export class FriendManager {
}
public RemoveFriend = async (user1: string, user2: string): Promise<void> => {
if(await FriendDataStore.GetFriendByUsers(user1, user2) === null){
throw new Error("Users are not friends!");
}
return await FriendDataStore.RemoveFriend(user1, user2);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment