Add episodes controller

This commit is contained in:
2020-02-29 16:01:22 +01:00
parent 0cef2e3df2
commit 54c0fb2fd2
10 changed files with 190 additions and 23 deletions

View File

@@ -29,6 +29,7 @@ namespace EstusShots.Server
services.AddAutoMapper(typeof(Startup));
services.AddControllers().AddJsonOptions(options =>
{
options.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
if (IsDevelopment)
{
options.JsonSerializerOptions.WriteIndented = true;
@@ -38,7 +39,10 @@ namespace EstusShots.Server
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "Estus Shots API", Version = "v1" });
});
// Register business logic services
services.AddScoped<SeasonsService>();
services.AddScoped<EpisodesService>();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -65,6 +69,7 @@ namespace EstusShots.Server
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
}
}