您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

19 行
500 B

  1. using Microsoft.AspNetCore.Authorization;
  2. using Microsoft.AspNetCore.Mvc;
  3. using System.Reflection;
  4. namespace MQTTnet.Server.Controllers
  5. {
  6. [Authorize]
  7. [ApiController]
  8. public class ServerController : Controller
  9. {
  10. [Route("api/v1/server/version")]
  11. [HttpGet]
  12. public ActionResult<string> GetVersion()
  13. {
  14. return Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
  15. }
  16. }
  17. }