diff --git a/Dfe.Academies.Academisation.WebApi/Dfe.Academies.Academisation.WebApi.csproj b/Dfe.Academies.Academisation.WebApi/Dfe.Academies.Academisation.WebApi.csproj index 5cda85111..963e7ec69 100644 --- a/Dfe.Academies.Academisation.WebApi/Dfe.Academies.Academisation.WebApi.csproj +++ b/Dfe.Academies.Academisation.WebApi/Dfe.Academies.Academisation.WebApi.csproj @@ -26,6 +26,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Dfe.Academies.Academisation.WebApi/Program.cs b/Dfe.Academies.Academisation.WebApi/Program.cs index 0471ea44b..1c095f797 100644 --- a/Dfe.Academies.Academisation.WebApi/Program.cs +++ b/Dfe.Academies.Academisation.WebApi/Program.cs @@ -97,8 +97,6 @@ if (File.Exists(descriptionsPath)) config.IncludeXmlComments(descriptionsPath); }); -builder.Services.AddHealthChecks(); - builder.Services.AddOptions(); var apiKeysConfiguration = builder.Configuration.GetSection("AuthenticationConfig"); builder.Services.Configure(apiKeysConfiguration); @@ -157,6 +155,9 @@ } ); +builder.Services.AddHealthChecks() + .AddDbContextCheck("Academisation Database"); + builder.Services.AddSwaggerGen(); builder.Services.ConfigureOptions(); builder.Services.AddAutoMapper(typeof(AutoMapperProfile));