26 lines
610 B
C#
26 lines
610 B
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace YuanXuan.IM.Api.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 健康检查控制器
|
|
/// </summary>
|
|
[Route("[controller]")]
|
|
[ApiController]
|
|
public class HealthController : ControllerBase
|
|
{
|
|
/// <summary>
|
|
/// 健康检查
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[AllowAnonymous]
|
|
public IActionResult Check()
|
|
{
|
|
return Ok(new { Status = "Healthy", Timestamp = DateTime.UtcNow });
|
|
}
|
|
}
|
|
}
|