checkpoint
This commit is contained in:
@@ -23,6 +23,8 @@ public class Program
|
||||
|
||||
builder.Services.AddLocalization(o => o.ResourcesPath = "LanguagesValues");
|
||||
builder.Services.AddRazorPages();
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddScoped<StatiKosev.Services.MessageService>();
|
||||
builder.Services.AddNpgsqlDataSource(databaseConnectionString);
|
||||
builder.Services.AddDbContext<AppDbContext>((sp, o) =>
|
||||
o.UseNpgsql(sp.GetRequiredService<NpgsqlDataSource>())); // EF shares the same connection pool
|
||||
@@ -80,6 +82,7 @@ public class Program
|
||||
|
||||
var app = builder.Build();
|
||||
app.UseAntiforgery();
|
||||
app.UseRateLimiter();
|
||||
|
||||
//accounts
|
||||
//safety check if form sends us to the same domain
|
||||
@@ -126,6 +129,7 @@ public class Program
|
||||
|
||||
app.UseStaticFiles(); // CSS/JS/images from wwwroot
|
||||
app.MapRazorPages();
|
||||
app.MapControllers();
|
||||
//get version of database the software is configured to work with (appsettings.json)
|
||||
app.MapGet("/db_version", async (NpgsqlDataSource db) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user