2025-03-11 21:21:16 -05:00
|
|
|
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 =>
|
|
|
|
|
{
|
2025-10-21 02:41:00 -05:00
|
|
|
endpoints.MapAuthenticationEndpoints();
|
2025-11-21 01:28:37 -06:00
|
|
|
endpoints.MapAuthApiEndpoints();
|
2025-08-19 03:08:30 -05:00
|
|
|
endpoints.MapChatEndpoints();
|
2025-03-11 21:21:16 -05:00
|
|
|
endpoints.MapDownloadEndpoints();
|
2025-11-20 22:04:20 -06:00
|
|
|
endpoints.MapGameEndpoints();
|
2025-11-21 01:28:37 -06:00
|
|
|
endpoints.MapDepotEndpoints();
|
|
|
|
|
endpoints.MapArchivesEndpoints();
|
|
|
|
|
endpoints.MapUploadEndpoints();
|
|
|
|
|
endpoints.MapProfileEndpoints();
|
|
|
|
|
endpoints.MapPlaySessionsEndpoints();
|
|
|
|
|
endpoints.MapMediaEndpoints();
|
|
|
|
|
endpoints.MapKeysEndpoints();
|
|
|
|
|
endpoints.MapLauncherEndpoints();
|
|
|
|
|
endpoints.MapLibraryEndpoints();
|
|
|
|
|
endpoints.MapRedistributablesEndpoints();
|
2025-11-21 00:25:59 -06:00
|
|
|
endpoints.MapIssueEndpoints();
|
2025-03-11 21:21:16 -05:00
|
|
|
endpoints.MapSaveEndpoints();
|
2025-08-07 23:35:33 -05:00
|
|
|
endpoints.MapServerEndpoints();
|
2025-09-26 00:49:34 -05:00
|
|
|
endpoints.MapSettingsEndpoints();
|
2025-03-16 21:04:24 -05:00
|
|
|
endpoints.MapTagEndpoints();
|
2025-03-11 21:21:16 -05:00
|
|
|
endpoints.MapControllers();
|
|
|
|
|
endpoints.MapFallbackToPage("/_Host");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return app;
|
|
|
|
|
}
|
|
|
|
|
}
|