using FrameProcessor.Mqtt;
using Microsoft.AspNetCore.Mvc;

namespace FrameProcessor.Controllers;

[ApiController]
[Route("health")]
public class HealthController : ControllerBase
{
    private readonly MqttPublisher _mqtt;

    public HealthController(MqttPublisher mqtt) => _mqtt = mqtt;

    [HttpGet]
    public IActionResult Get() => Ok(new { status = "Healthy", mqttConnected = _mqtt.IsConnected });
}
