Merge master
This commit is contained in:
@@ -34,7 +34,10 @@ namespace EstusShots.Server
|
||||
services.AddControllers().AddJsonOptions(options =>
|
||||
{
|
||||
options.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
|
||||
if (IsDevelopment) options.JsonSerializerOptions.WriteIndented = true;
|
||||
if (IsDevelopment)
|
||||
{
|
||||
options.JsonSerializerOptions.WriteIndented = true;
|
||||
}
|
||||
});
|
||||
services.AddSwaggerGen(options =>
|
||||
{
|
||||
@@ -44,7 +47,6 @@ namespace EstusShots.Server
|
||||
// Register business logic services
|
||||
services.AddScoped<SeasonsService>();
|
||||
services.AddScoped<EpisodesService>();
|
||||
services.AddScoped<PlayersService>();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
@@ -53,15 +55,19 @@ namespace EstusShots.Server
|
||||
IsDevelopment = env.IsDevelopment();
|
||||
if (IsDevelopment)
|
||||
app.UseDeveloperExceptionPage();
|
||||
else
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
// Do not Redirect for now. Breaks local tests.
|
||||
// app.UseHttpsRedirection();
|
||||
|
||||
// Enable middleware to serve generated Swagger as a JSON endpoint.
|
||||
app.UseSwagger();
|
||||
|
||||
// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
|
||||
// specifying the Swagger JSON endpoint.
|
||||
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Estus Shots API V1"); });
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Estus Shots API V1");
|
||||
});
|
||||
|
||||
app.UseRouting();
|
||||
app.UseAuthorization();
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Clean up
|
||||
echo "Cleaning up build directory"
|
||||
[ -d "Publish" ] && rm -r Publish
|
||||
|
||||
# Publish Server
|
||||
echo "Running dotnet publish for server"
|
||||
dotnet publish \
|
||||
|
||||
Reference in New Issue
Block a user