LANCommander/LANCommander.Server/Startup/Endpoints.cs
Pat Hartl 120e14d40c Add Tools section to server app
Allows users to upload additional tools and tie them to games. This can be useful for software like map editors, trainers, etc.
2026-02-08 02:24:53 -06:00

47 lines
No EOL
1.6 KiB
C#

using LANCommander.Server.Endpoints;
namespace LANCommander.Server.Startup;
public static class Endpoints
{
public static void AddControllers(this WebApplicationBuilder builder)
{
builder.Services.AddControllers().AddJsonOptions(static x =>
{
x.JsonSerializerOptions.ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.IgnoreCycles;
});
}
public static WebApplication MapEndpoints(this WebApplication app)
{
app.UseEndpoints(endpoints =>
{
endpoints.MapAuthenticationEndpoints();
endpoints.MapAuthApiEndpoints();
endpoints.MapChatEndpoints();
endpoints.MapDownloadEndpoints();
endpoints.MapExportEndpoints();
endpoints.MapGameEndpoints();
endpoints.MapDepotEndpoints();
endpoints.MapArchivesEndpoints();
endpoints.MapUploadEndpoints();
endpoints.MapProfileEndpoints();
endpoints.MapPlaySessionsEndpoints();
endpoints.MapMediaEndpoints();
endpoints.MapKeysEndpoints();
endpoints.MapLauncherEndpoints();
endpoints.MapLibraryEndpoints();
endpoints.MapRedistributablesEndpoints();
endpoints.MapToolsEndpoints();
endpoints.MapIssueEndpoints();
endpoints.MapSaveEndpoints();
endpoints.MapServerEndpoints();
endpoints.MapSettingsEndpoints();
endpoints.MapTagEndpoints();
endpoints.MapControllers();
endpoints.MapFallbackToPage("/_Host");
});
return app;
}
}