31 lines
856 B
C#
31 lines
856 B
C#
using Dlhis.Basic.Common.SysData.Request;
|
|
using Dlhis.Basic.Common.SysData.Services;
|
|
using Kurisu.AspNetCore.UnifyResultAndValidation.Aop;
|
|
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 健康检查
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
[DisableApiLog]
|
|
[HttpPost("healthz")]
|
|
public async Task CheckAsync(MiddleHealthCheckRequest request)
|
|
{
|
|
await _healthCheckService.CheckAsync(request.Factories);
|
|
}
|
|
} |