This commit is contained in:
Zeeshaun
2026-04-27 10:50:07 -05:00
parent 8b528fa00b
commit b5edd55420
141 changed files with 9602 additions and 0 deletions
@@ -0,0 +1,39 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
using Serilog;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.Status.Services;
namespace LCU.Api.Internal.FileOperations.Controllers;
[ApiController]
[Route("api/[controller]")]
public class StatusController : ControllerBase
{
private readonly IApiHealthCheckService _apiHealthCheckService;
public StatusController(IApiHealthCheckService apiHealthCheckService)
{
_apiHealthCheckService = apiHealthCheckService;
}
[HttpGet]
[ProducesResponseType(200)]
[ProducesResponseType(500)]
public IActionResult Get()
{
try
{
return Ok(_apiHealthCheckService.CheckApiHealthAndBuildEnvironmentView());
}
catch (ServiceException exception)
{
return StatusCode(StatusCodes.Status500InternalServerError, exception.Message);
}
catch (Exception exception)
{
Log.Error(exception, "Unexpected Exception");
return StatusCode(StatusCodes.Status500InternalServerError);
}
}
}