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
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:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user