using Backend.Security;

namespace Backend.Endpoints;

public static class AdminEndpoints
{
    public static IEndpointRouteBuilder MapAdminEndpoints(this IEndpointRouteBuilder app)
    {
        var group = app.MapGroup("/api/admin")
            .AddEndpointFilter<AdminSessionFilter>();

        group.MapAdminSiteSettingsEndpoints();

        group.MapAdminDashboardEndpoints();
        group.MapAdminSeasonManagementEndpoints();
        group.MapAdminArchiveEndpoints();
        group.MapAdminModerationEndpoints();
        group.MapAdminExtrasEndpoints();
        group.MapAdminTeamEndpoints();

        return app;
    }
}
