Pārlūkot izejas kodu

Add version information to MQTTnet.Server.

release/3.x.x
Christian Kratky pirms 5 gadiem
vecāks
revīzija
ed06ea6bc9
1 mainītis faili ar 18 papildinājumiem un 0 dzēšanām
  1. +18
    -0
      Source/MQTTnet.Server/Controllers/ServerController.cs

+ 18
- 0
Source/MQTTnet.Server/Controllers/ServerController.cs Parādīt failu

@@ -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;
}
}
}

Notiek ielāde…
Atcelt
Saglabāt