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.

ServerController.cs 500 B

123456789101112131415161718
  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. }