Update Program.cs

This commit is contained in:
Rick Anderson 2024-04-27 17:06:45 -10:00 committed by GitHub
parent a0ccfc84da
commit ddaf5ecc73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,7 @@ if (app.Environment.IsDevelopment())
{ {
app.UseDeveloperExceptionPage(); app.UseDeveloperExceptionPage();
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(c => app.UseSwaggerUI(c => // UseSwaggerUI Protected by if (env.IsDevelopment())
{ {
c.SwaggerEndpoint("/swagger/v1/swagger.json", "PizzaStore API V1"); c.SwaggerEndpoint("/swagger/v1/swagger.json", "PizzaStore API V1");
}); });