29 lines
512 B
C#
29 lines
512 B
C#
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;
|
|
}
|
|
}
|