feat 获取服务时间

This commit is contained in:
2024-03-17 21:26:16 +08:00
parent 6872518b65
commit 6ba2d7d6a2
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.Sys.Server.Controllers;
/// <summary>
/// 服务器信息
/// </summary>
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class ServerController : ControllerBase
{
public ServerController()
{
}
/// <summary>
/// 当前时间
/// </summary>
/// <returns></returns>
[HttpGet("datetime")]
public DateTime GetServerDateTime()
{
return DateTime.Now;
}
}