diff --git a/MoneyMap/MoneyMap.csproj b/MoneyMap/MoneyMap.csproj
index 5bf1c27..be2d1a7 100644
--- a/MoneyMap/MoneyMap.csproj
+++ b/MoneyMap/MoneyMap.csproj
@@ -26,6 +26,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/MoneyMap/Program.cs b/MoneyMap/Program.cs
index 6c61c38..bc0c3c7 100644
--- a/MoneyMap/Program.cs
+++ b/MoneyMap/Program.cs
@@ -27,6 +27,10 @@ builder.Services.AddSession(options =>
builder.Services.AddRazorPages()
.AddSessionStateTempDataProvider();
+builder.Services.AddControllers();
+builder.Services.AddEndpointsApiExplorer();
+builder.Services.AddSwaggerGen();
+
// Receipt parse queue and background worker
builder.Services.AddSingleton();
builder.Services.AddHostedService();
@@ -70,21 +74,13 @@ app.UseSession();
app.UseAuthorization();
-app.MapRazorPages();
-
-// Financial Audit API endpoint
-app.MapGet("/api/audit", async (
- IFinancialAuditService auditService,
- DateTime? startDate,
- DateTime? endDate,
- bool includeTransactions = false) =>
+if (app.Environment.IsDevelopment())
{
- var end = endDate ?? DateTime.Today;
- var start = startDate ?? end.AddDays(-90);
+ app.UseSwagger();
+ app.UseSwaggerUI();
+}
- var result = await auditService.GenerateAuditAsync(start, end, includeTransactions);
- return Results.Ok(result);
-})
-.WithName("GetFinancialAudit");
+app.MapRazorPages();
+app.MapControllers();
app.Run();