This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
DevOpsOpenHack/apis/poi/web/Controllers/VersionController.cs

20 lines
478 B
C#
Raw Permalink Normal View History

2022-11-03 20:41:13 +00:00
using System;
using Microsoft.AspNetCore.Mvc;
namespace poi.Controllers
{
[Produces("application/json")]
[Route("api")]
public class VersionController : ControllerBase
{
[Route("version/poi")]
[HttpGet]
[Produces("text/plain", Type = typeof(String))]
public string GetVersion()
{
var version = Environment.GetEnvironmentVariable("APP_VERSION");
return version ?? "default";
}
}
}