Skip to content

Commit 964ba7d

Browse files
authored
Merge pull request #224 from AndrewCS149/testWorkflow
testWorkflow
2 parents bb5ae08 + 606b10a commit 964ba7d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

server/Program.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public static void Main(string[] args)
2727
});
2828

2929
// Add services to the container.
30-
builder.Services.AddSwaggerGen();
31-
// builder.Services.AddSwaggerGen(c =>
32-
// {
33-
// c.SwaggerDoc("v1", new OpenApiInfo { Title = "DevBlog", Version = "v1" });
34-
// });
30+
// builder.Services.AddSwaggerGen();
31+
builder.Services.AddSwaggerGen(c =>
32+
{
33+
c.SwaggerDoc("v1", new OpenApiInfo { Title = "DevBlog", Version = "v1" });
34+
});
3535

3636
// builder.Services.AddControllersWithViews();
3737

@@ -113,9 +113,12 @@ public static void Main(string[] args)
113113
if (!app.Environment.IsDevelopment())
114114
{
115115
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
116+
app.UseHsts();
117+
}
118+
else
119+
{
116120
app.UseSwagger();
117121
app.UseSwaggerUI();
118-
app.UseHsts();
119122
}
120123

121124
// ------------------- MIDDLEWARE -------------------------------

0 commit comments

Comments
 (0)