mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-12-29 00:55:48 +08:00
wip: 🧠 初步的框架
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using NetAdmin.Host.Controllers;
|
||||
using NetAdmin.SysComponent.Application.Modules.Sys;
|
||||
using NetAdmin.SysComponent.Application.Services.Sys.Dependency;
|
||||
using NetAdmin.SysComponent.Cache.Sys.Dependency;
|
||||
|
||||
namespace NetAdmin.SysComponent.Host.Controllers.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 工具服务
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(nameof(Sys), Module = nameof(Sys))]
|
||||
public sealed class ToolsController : ControllerBase<IToolsCache, IToolsService>, IToolsModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ToolsController" /> class.
|
||||
/// </summary>
|
||||
public ToolsController(IToolsCache cache) //
|
||||
: base(cache) { }
|
||||
|
||||
/// <summary>
|
||||
/// 服务器时间
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
public DateTime GetServerUtcTime()
|
||||
{
|
||||
return Cache.GetServerUtcTime();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 版本信息
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
public string Version()
|
||||
{
|
||||
return Cache.Version();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user