From 1fa5e8d5d8231e3131180cf5bd4fc3e73cfd6440 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Sat, 20 Jan 2024 19:46:43 +0800 Subject: [PATCH] always enable Swagger --- TechStacks/Program.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/TechStacks/Program.cs b/TechStacks/Program.cs index aca29ed..751b604 100644 --- a/TechStacks/Program.cs +++ b/TechStacks/Program.cs @@ -109,14 +109,12 @@ var app = builder.Build(); +app.UseMigrationsEndPoint(); +app.UseSwagger(); +app.UseSwaggerUI(); + // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) -{ - app.UseMigrationsEndPoint(); - app.UseSwagger(); - app.UseSwaggerUI(); -} -else { app.UseExceptionHandler("/Home/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.