Files
DorkNet/DorkNet.Services.Social/Program.cs
T
2026-06-15 20:21:05 +03:00

38 lines
1006 B
C#

using DorkNet.Contracts;
using DorkNet.ServiceDefaults;
using DorkNet.Server.Startup;
var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddJsonFile("appsettings.Local.json",
optional: true, reloadOnChange: true);
builder.AddDorkNetServiceDefaults(ServiceNames.Social);
builder.AddDorkNetServices();
var app = builder.Build();
await app.RunDatabaseBootstrapAsync();
app.MapDorkNetServiceDefaults(mapPublicHealth: false);
app.MapGet("/internal/social/capabilities", () =>
Results.Ok(new ServiceCapabilityResponse(
ServiceNames.Social,
[
"clubs",
"groups",
"announcements",
"player-events",
"subscriptions",
],
[
"/club/*",
"/api/groups/*",
"/api/playerevents/*",
"/api/playersubscriptions/*",
"/announcements/*",
])));
app.UseDorkNetRouteOwnershipGuard(ServiceNames.Social);
app.UseDorkNetPipeline();
app.Run();