using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using SeaHaven.Services.DTOs; using SeaHaven.Services.Interfaces; namespace Api.SeaHavenIndustries.Controllers { /// Ops health and coexistence metrics (Fase 7). [Authorize(Roles = "Admin")] [ApiController] [Route("api/workorders/ops")] public class WorkOrderOpsController : ControllerBase { private readonly IWorkOrderOpsHealthService _healthService; public WorkOrderOpsController(IWorkOrderOpsHealthService healthService) { _healthService = healthService; } [HttpGet("health")] [ProducesResponseType(typeof(WorkOrderOpsHealthDto), StatusCodes.Status200OK)] public async Task> GetHealth(CancellationToken cancellationToken) { var health = await _healthService.GetHealthAsync(cancellationToken); return Ok(health); } } }