update .net, setup modern logging
Some checks failed
Build and Publish / Build Yale Access Backend (pull_request) Failing after 1m28s
Build and Publish / Push Yale Access Backend Docker Image (pull_request) Has been skipped
Build and Publish / Build Yale Access Frontend (pull_request) Successful in 1m42s
Build and Publish / Push Yale Access Frontend Docker Image (pull_request) Has been skipped

This commit is contained in:
2026-02-18 08:48:15 +11:00
parent f577617b4d
commit 6d5749acd3
9 changed files with 84 additions and 122 deletions

View File

@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using Serilog;
namespace YaleAccess.Controllers
{
@@ -9,13 +8,13 @@ namespace YaleAccess.Controllers
[Route("api/[controller]")]
[EnableCors]
[Authorize]
public class HealthController : ControllerBase
public class HealthController(ILogger<HealthController> logger) : ControllerBase
{
[HttpGet]
[AllowAnonymous]
public IActionResult Health()
{
Log.Logger.Information("Hit the health endpoint.");
logger.LogInformation("Hit the health endpoint.");
return Ok("Service is healthy");
}
}