yale-user-access/packages/backend/Controllers/HealthController.cs

22 lines
525 B
C#
Raw Permalink Normal View History

2025-01-10 08:37:18 +11:00
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using Serilog;
namespace YaleAccess.Controllers
{
[ApiController]
[Route("api/[controller]")]
[EnableCors]
[Authorize]
public class HealthController : ControllerBase
{
[HttpGet]
[AllowAnonymous]
public IActionResult Health()
{
Log.Logger.Information("Hit the health endpoint.");
return Ok("Service is healthy");
}
}
}