feat(admin): port site administration to API and PostIt
Some checks failed
Dotnet build and test / build (push) Failing after 13m0s
Forgejo Release / release (push) Successful in 8m1s

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-10-18 18:47:12 +01:00
commit 04c42d9380
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
29 changed files with 2580 additions and 53 deletions

View file

@ -13,6 +13,7 @@ using Yavsc;
using Yavsc.Server.Helpers;
using Yavsc.Services;
using Yavsc.Server.Hubs;
using Yavsc.Api.Services;
internal class Program
{
@ -25,6 +26,7 @@ internal class Program
builder.AddConfiguration("api");
var services = builder.Services;
services.AddSiteAdministration();
// Anthropic client
builder.Services.AddSingleton<AnthropicClient>(_ =>
@ -132,7 +134,10 @@ internal class Program
using (var app = builder.Build())
{
if (app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.MapOpenApi().RequireAuthorization("AdministratorOnly");
}
app
.UseRouting()