Updated daily report to show correct information when two work weeks split quarters.
Also current changes to project with Blazor implementation is implemented here as well.
This commit is contained in:
@ -10,7 +10,16 @@ public class Program
|
||||
{
|
||||
LoggerConfiguration loggerConfiguration = new();
|
||||
|
||||
var CorsPolicy = "CorsPolicy";
|
||||
|
||||
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
|
||||
_ = builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy(name: CorsPolicy, policy =>
|
||||
{
|
||||
policy.WithOrigins("https://localhost:7244");
|
||||
});
|
||||
});
|
||||
_ = builder.Configuration.AddUserSecrets<Program>();
|
||||
AppSettings appSettings = Models.Binder.AppSettings.Get(builder.Configuration);
|
||||
Environment.SetEnvironmentVariable("workingDirectory", appSettings.LoggingDirectory);
|
||||
@ -24,6 +33,7 @@ public class Program
|
||||
_ = builder.Services.AddEndpointsApiExplorer();
|
||||
_ = builder.Services.AddSwaggerGen();
|
||||
_ = builder.Services.AddSingleton(_ => appSettings);
|
||||
|
||||
_ = builder.Services.AddScoped<IScrapeDatabaseRepository, ScrapeDatabaseRepository>(_ => new(appSettings.ConnectionString));
|
||||
|
||||
WebApplication app = builder.Build();
|
||||
@ -37,6 +47,8 @@ public class Program
|
||||
|
||||
_ = app.UseHttpsRedirection();
|
||||
|
||||
_ = app.UseCors(CorsPolicy);
|
||||
|
||||
_ = app.UseAuthorization();
|
||||
|
||||
_ = app.MapControllers();
|
||||
|
Reference in New Issue
Block a user