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
21 lines
543 B
C#
21 lines
543 B
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Cors;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace YaleAccess.Controllers
|
|
{
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
[EnableCors]
|
|
[Authorize]
|
|
public class HealthController(ILogger<HealthController> logger) : ControllerBase
|
|
{
|
|
[HttpGet]
|
|
[AllowAnonymous]
|
|
public IActionResult Health()
|
|
{
|
|
logger.LogInformation("Hit the health endpoint.");
|
|
return Ok("Service is healthy");
|
|
}
|
|
}
|
|
} |