Spaces:
Running
Running
Florin Bobiș
commited on
Commit
•
27fff89
1
Parent(s):
35103e1
health endpoint
Browse files- Program.cs +2 -0
Program.cs
CHANGED
@@ -125,6 +125,8 @@ app.MapGet("/quotes/search", async (string search, QuoteDbContext db, int pageNu
|
|
125 |
return paginatedQuotes.Any() ? Results.Ok(paginatedQuotes) : Results.NotFound("No matching quotes found.");
|
126 |
});
|
127 |
|
|
|
|
|
128 |
async Task SaveSource1Async(string jsonFilePath, QuoteDbContext db)
|
129 |
{
|
130 |
var path = Path.Combine(Directory.GetCurrentDirectory(), "data", jsonFilePath);
|
|
|
125 |
return paginatedQuotes.Any() ? Results.Ok(paginatedQuotes) : Results.NotFound("No matching quotes found.");
|
126 |
});
|
127 |
|
128 |
+
app.MapGet("/health", () => Results.Ok(new { Status = "Healthy", Timestamp = DateTime.UtcNow }));
|
129 |
+
|
130 |
async Task SaveSource1Async(string jsonFilePath, QuoteDbContext db)
|
131 |
{
|
132 |
var path = Path.Combine(Directory.GetCurrentDirectory(), "data", jsonFilePath);
|