after refactor cleanup

This commit is contained in:
2025-11-28 11:21:22 +01:00
parent 5db6de1503
commit 07423023a0
305 changed files with 80 additions and 13326 deletions

38
DiunaBI.UI.Web/Program.cs Normal file
View File

@@ -0,0 +1,38 @@
using DiunaBI.UI.Shared;
using DiunaBI.UI.Shared.Extensions;
using DiunaBI.UI.Shared.Services;
using DiunaBI.UI.Web.Components;
using MudBlazor.Services;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services.AddMudServices();
var apiBaseUrl = builder.Configuration["ApiSettings:BaseUrl"]
?? throw new InvalidOperationException("ApiSettings:BaseUrl is not configured");
builder.Services.AddSharedServices(apiBaseUrl);
builder.Services.AddScoped<IGoogleAuthService, WebGoogleAuthService>();
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseAntiforgery();
app.MapStaticAssets();
app.MapGet("/health", () => Results.Ok(new { status = "OK", timestamp = DateTime.UtcNow }));
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddAdditionalAssemblies(typeof(MainLayout).Assembly);
app.Run();