mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 15:23:12 +00:00
29 lines
989 B
C#
29 lines
989 B
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using SeaHaven.Services.DTOs;
|
|
using SeaHaven.Services.Interfaces;
|
|
|
|
namespace Api.SeaHavenIndustries.Controllers
|
|
{
|
|
/// <summary>Ops health and coexistence metrics (Fase 7).</summary>
|
|
[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<ActionResult<WorkOrderOpsHealthDto>> GetHealth(CancellationToken cancellationToken)
|
|
{
|
|
var health = await _healthService.GetHealthAsync(cancellationToken);
|
|
return Ok(health);
|
|
}
|
|
}
|
|
}
|