chat: add initial GuildsController

This commit is contained in:
sam 2024-05-21 20:14:52 +02:00
parent 7b4cbd4fb7
commit 727f2f6ba2
23 changed files with 248 additions and 38 deletions

View file

@ -1,4 +1,6 @@
using Foxchat.Chat.Middleware;
using Foxchat.Chat.Services;
using Foxchat.Core.Middleware;
namespace Foxchat.Chat.Extensions;
@ -7,12 +9,20 @@ public static class WebApplicationExtensions
public static IServiceCollection AddCustomMiddleware(this IServiceCollection services)
{
return services
.AddScoped<AuthenticationMiddleware>();
.AddScoped<ErrorHandlerMiddleware>()
.AddScoped<ServerAuthenticationMiddleware>();
}
public static IApplicationBuilder UseCustomMiddleware(this IApplicationBuilder app)
{
return app
.UseMiddleware<AuthenticationMiddleware>();
.UseMiddleware<ErrorHandlerMiddleware>()
.UseMiddleware<ServerAuthenticationMiddleware>();
}
public static IServiceCollection AddChatServices(this IServiceCollection services)
{
return services
.AddScoped<UserResolverService>();
}
}