From 168d6af8603701e347d312c3a27ab4ace2b77f12 Mon Sep 17 00:00:00 2001 From: Sergey Karmanov Date: Thu, 21 May 2026 23:20:33 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20quartz.net=20dashboard=20=D0=B4=D0=BB=D1=8F=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/UniVerse.Api/Program.cs | 14 ++++++++++++++ backend/UniVerse.Api/UniVerse.Api.csproj | 2 ++ 2 files changed, 16 insertions(+) diff --git a/backend/UniVerse.Api/Program.cs b/backend/UniVerse.Api/Program.cs index f66c10d..8daf54c 100644 --- a/backend/UniVerse.Api/Program.cs +++ b/backend/UniVerse.Api/Program.cs @@ -108,6 +108,13 @@ if (!isOpenApiGeneration) options.WaitForJobsToComplete = true; }); } +if (builder.Environment.IsDevelopment() && !isOpenApiGeneration) +{ + builder.Services.AddQuartzDashboard(options => + { + options.ReadOnly = true; + }); +} // --- HTTP Clients --- builder.Services.AddHttpClient(client => @@ -188,6 +195,8 @@ app.UseMiddleware(); if (app.Environment.IsDevelopment()) { + app.UseStaticFiles(); + app.UseSwagger(c => { c.RouteTemplate = "api/docs/{documentName}/swagger.json"; @@ -203,6 +212,11 @@ if (app.Environment.IsDevelopment()) app.UseCors(); app.UseAuthentication(); app.UseAuthorization(); +if (app.Environment.IsDevelopment()) +{ + app.UseAntiforgery(); + app.MapQuartzDashboard(); +} app.MapControllers(); app.Run(); diff --git a/backend/UniVerse.Api/UniVerse.Api.csproj b/backend/UniVerse.Api/UniVerse.Api.csproj index 73bdb14..5102384 100644 --- a/backend/UniVerse.Api/UniVerse.Api.csproj +++ b/backend/UniVerse.Api/UniVerse.Api.csproj @@ -11,6 +11,7 @@ true $(BaseIntermediateOutputPath)openapi --file-name openapi + true $(NoWarn);1591 @@ -23,6 +24,7 @@ +