You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
555 B

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