From 1023151174330172fb985bfde2ca8b3b8eaff9f1 Mon Sep 17 00:00:00 2001 From: Louis LABORIE Date: Thu, 6 Feb 2025 08:43:30 +0100 Subject: [PATCH] Hope this will work :mute::mute: --- Server/Program.cs | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Server/Program.cs b/Server/Program.cs index 79a514f..b3d0dbf 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -59,19 +59,23 @@ builder.Services.AddRouting(options => options.LowercaseUrls = true); var app = builder.Build(); // Configure the HTTP request pipeline. -if (app.Environment.IsDevelopment()) -{ - app.UseSwagger(); - app.UseSwaggerUI(c => - { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "Optifit API v1"); - c.RoutePrefix = string.Empty; // Serve Swagger UI at the app's root - }); - app.UseHttpsRedirection(); -} +//if (app.Environment.IsDevelopment()) +// { +// app.UseSwagger(); +// app.UseSwaggerUI(c => +// { +// c.SwaggerEndpoint("/swagger/v1/swagger.json", "Optifit API v1"); +// c.RoutePrefix = string.Empty; // Serve Swagger UI at the app's root +// }); +// app.UseHttpsRedirection(); +//} app.UseSwagger(); -app.UseSwaggerUI(); +app.UseSwaggerUI(c => +{ + c.SwaggerEndpoint("/swagger/v1/swagger.json", "Optifit API v1"); + c.RoutePrefix = string.Empty; // Serve Swagger UI at the app's root +}); app.UseAuthorization(); app.MapControllers(); app.Run(); \ No newline at end of file