浏览代码

Add version information to MQTTnet.Server.

release/3.x.x
Christian Kratky 5 年前
父节点
当前提交
ed06ea6bc9
共有 1 个文件被更改,包括 18 次插入0 次删除
  1. +18
    -0
      Source/MQTTnet.Server/Controllers/ServerController.cs

+ 18
- 0
Source/MQTTnet.Server/Controllers/ServerController.cs 查看文件

@@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Reflection;

namespace MQTTnet.Server.Controllers
{
[Authorize]
[ApiController]
public class ServerController : Controller
{
[Route("api/v1/server/version")]
[HttpGet]
public ActionResult<string> GetVersion()
{
return Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
}
}
}

正在加载...
取消
保存