|
|
|
@ -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();
|