mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
technical edits
This commit is contained in:
@@ -27,9 +27,7 @@ public class FriendshipService : IFriendshipService
|
||||
{
|
||||
all = await _usersRepository.SearchPotentialFriendsAsync(currentId, query);
|
||||
|
||||
return all
|
||||
.Where(u => u.Id != currentId)
|
||||
.ToList();
|
||||
return all;
|
||||
}
|
||||
catch (NotFoundByKeyException<(string, Guid)> ex)
|
||||
{
|
||||
@@ -37,7 +35,7 @@ public class FriendshipService : IFriendshipService
|
||||
}
|
||||
catch (NotFoundByKeyException<Guid> ex)
|
||||
{
|
||||
return all.Where(u => u.Id != currentId).ToList();
|
||||
return [];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -58,7 +56,7 @@ public class FriendshipService : IFriendshipService
|
||||
}
|
||||
catch (NotFoundByKeyException<Guid> ex)
|
||||
{
|
||||
throw new InvalidOperationException("User not found", ex);
|
||||
throw new InvalidOperationException("Nothing was found for the specified id.", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user