GetAPIVersion

This commit is contained in:
Michał Zieliński
2025-02-19 11:03:02 +01:00
parent 0a910bd590
commit 40d0a96f89
4 changed files with 9 additions and 1 deletions

View File

@@ -105,4 +105,10 @@ public class AdminController : Controller
return BadRequest(e.ToString()); return BadRequest(e.ToString());
} }
} }
[HttpGet]
[Route("Version")]
public IActionResult GetVersion() {
return Ok(new { version = _configuration["app-version"] });
}
} }

View File

@@ -1,2 +1,2 @@
### ###
GET http://localhost:5400/api/Admin/GetQueue GET http://localhost:5400/api/Admin/Version

View File

@@ -1,5 +1,6 @@
{ {
"PONG": "Development", "PONG": "Development",
"app-version": "0.0-dev",
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",

View File

@@ -1,5 +1,6 @@
{ {
"PONG": "#{PING}#", "PONG": "#{PING}#",
"app-version": "#{buildId}#",
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",