technical edits

This commit is contained in:
Artemy
2025-12-12 17:23:01 +07:00
parent bf2aca40d3
commit 7e6f914878
23 changed files with 461 additions and 114 deletions
@@ -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);
}
}
}