using Dlhis.Basic.Common.SysData.Request;
using Dlhis.Basic.Common.SysData.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.Basic.Common.SysData.Controller;
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class MiddlesController : ControllerBase
{
private readonly IHealthCheckService _healthCheckService;
public MiddlesController(IHealthCheckService healthCheckService)
{
_healthCheckService = healthCheckService;
}
///
/// 健康检查
///
///
[HttpPost("healthz")]
public async Task CheckAsync(MiddleHealthCheckRequest request)
{
await _healthCheckService.CheckAsync(request.Factories);
}
}