Files
monorepo/LCU.API.Internal.MaidBotApi/LCU.Api.Internal.MaidBotApi/Controllers/StatusController.cs
T
2026-03-11 13:21:47 -05:00

34 lines
821 B
C#

using System;
using Microsoft.AspNetCore.Mvc;
using Serilog;
using LCU.Api.Internal.MaidBotApi.EnvironmentView;
namespace LCU.API.Internal.MaidBotApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class StatusController : ControllerBase
{
private readonly IEnvironmentView _environmentView;
public StatusController(IEnvironmentView environmentView)
{
_environmentView = environmentView;
}
[HttpGet()]
[ProducesResponseType(200)]
[ProducesResponseType(500)]
public IActionResult Get()
{
try
{
return Ok(_environmentView);
}
catch (Exception ex)
{
Log.Error(ex, "Failure to return status");
return StatusCode((int)System.Net.HttpStatusCode.InternalServerError);
}
}
}