diff --git a/Source/MQTTnet.Server/Controllers/ServerController.cs b/Source/MQTTnet.Server/Controllers/ServerController.cs new file mode 100644 index 0000000..cf53bba --- /dev/null +++ b/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 GetVersion() + { + return Assembly.GetExecutingAssembly().GetCustomAttribute().InformationalVersion; + } + } +}