feat(admin): port site administration to API and PostIt
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ba384ba4c0
commit
04c42d9380
29 changed files with 2580 additions and 53 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue