Added roles (may or may not be used)

This commit is contained in:
Veljko Tosic
2026-02-12 20:25:51 +01:00
parent 86f66727f3
commit 5ecf8435f4
5 changed files with 71 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
using AipsCore.Infrastructure.DI;
using AipsCore.Infrastructure.Persistence.Db;
using AipsWebApi.Middleware;
using DotNetEnv;
@@ -15,13 +16,17 @@ builder.Services.AddAips(builder.Configuration);
var app = builder.Build();
using (var scope = app.Services.CreateScope())
{
await DbInitializer.SeedRolesAsync(scope.ServiceProvider);
}
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}
app.UseMiddleware<ExceptionHandlingMiddleware>();
app.UseAuthentication();