mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
Improve friends search and error handling in API
Refactored FriendsController to provide more precise error responses and input validation. Enhanced FriendsService to handle new exception types and improved user search logic. Added tests for user search, updated repository to throw on empty search results, and implemented User equality override. Cleaned up Program.cs controller JSON options.
This commit is contained in:
@@ -4,7 +4,7 @@ namespace Govor.Application.Interfaces;
|
||||
|
||||
public interface IFriendsService
|
||||
{
|
||||
Task<List<User>> SearchUsersAsync(string searchTerm, Guid currentId);
|
||||
Task<List<User>> SearchUsersAsync(string query, Guid currentId);
|
||||
Task SendFriendRequestAsync(Guid fromUserId, Guid toUserId);
|
||||
Task AcceptFriendRequestAsync(Guid requestId, Guid currentUserId);
|
||||
Task<List<User>> GetFriendsAsync(Guid userId);
|
||||
|
||||
Reference in New Issue
Block a user