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,15 @@
using Govor.API.Filters;
using Microsoft.AspNetCore.SignalR;
namespace Govor.API.Extensions;
public static class ConfigurationSignalR
{
public static void AddSignalRConf(this IServiceCollection services)
{
services.AddSignalR(options =>
{
options.AddFilter<HubExceptionFilter>();
});
}
}