Refactor friend request services and add SignalR error handling

Split IFriendRequestService into command and query interfaces, refactor related services and tests, and update dependency injection. Add HubResult response model and a SignalR HubExceptionFilter for consistent error handling. Move and update FriendsHub to use new command service and result pattern. Update username validation to allow digits after Cyrillic letters. Add new controllers and configuration for SignalR. Remove obsolete IFriendRequestService and related code.
This commit is contained in:
Artemy
2025-07-10 15:31:57 +07:00
parent b1f3aa0266
commit 437bedb117
20 changed files with 571 additions and 205 deletions
@@ -0,0 +1,8 @@
namespace Govor.Application.Interfaces.Friends;
public interface IFriendRequestCommandService
{
Task SendAsync(Guid fromUserId, Guid toUserId);
Task AcceptAsync(Guid requestId, Guid currentUserId);
Task RejectAsync(Guid requestId, Guid currentUserId);
}