diff --git a/.gitignore b/.gitignore index d7d810d..09aae2a 100644 --- a/.gitignore +++ b/.gitignore @@ -85,4 +85,9 @@ API/app.db-shm # Vite build output GUI/dist/ -wwwroot/ \ No newline at end of file +wwwroot/ + +# SQLite Datenbank-Dateien +*.db +*.db-shm +*.db-wal \ No newline at end of file diff --git a/API/Program.cs b/API/Program.cs index 628cc81..f3b5e7e 100644 --- a/API/Program.cs +++ b/API/Program.cs @@ -18,18 +18,19 @@ builder.Services.AddSwaggerGen(); // Authentication builder.Services.AddAuthorization(); -builder.Services.AddAuthentication().AddCookie(IdentityConstants.ApplicationScheme); +builder.Services.AddAuthentication() + .AddCookie(IdentityConstants.ApplicationScheme); builder.Services.AddIdentityCore() .AddEntityFrameworkStores() .AddApiEndpoints(); // Database -var postgreConnection = builder.Configuration.GetConnectionString("PostgresConnection"); -if (!string.IsNullOrEmpty(postgreConnection)) +var postgresConnection = builder.Configuration.GetConnectionString("PostgresConnection"); +if (!string.IsNullOrEmpty(postgresConnection)) { // Nutze PostgresSQL - builder.Services.AddDbContext(options => options.UseNpgsql(postgreConnection)); + builder.Services.AddDbContext(options => options.UseNpgsql(postgresConnection)); } else { @@ -64,7 +65,7 @@ app.UseDefaultFiles(); app.UseStaticFiles(); app.UseHttpsRedirection(); - +app.UseAuthentication(); app.UseAuthorization(); // Map Auth Endpoints diff --git a/API/app.db b/API/app.db index ac5d8a8..2eb27a2 100644 Binary files a/API/app.db and b/API/app.db differ