Skip to content

Commit

Permalink
API: update version info
Browse files Browse the repository at this point in the history
  • Loading branch information
webprofusion-chrisc committed Nov 1, 2024
1 parent c8d7bf6 commit 7f8c9b9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions src/Certify.Models/API/VersionInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Certify.Models.API
{
public class VersionInfo
{
public string Product { get; set; } = string.Empty;
public string Version { get; set; } = string.Empty;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ public SystemController(ILogger<SystemController> logger, ICertifyInternalApiCli
/// <returns></returns>
[HttpGet]
[Route("version")]
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(Version))]
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(Models.API.VersionInfo))]
public async Task<IActionResult> GetSystemVersion()
{
var versionInfo = await _client.GetAppVersion();

return new OkObjectResult(Version.Parse(versionInfo));
var result = new Models.API.VersionInfo { Version = versionInfo, Product = "Certify Management Hub" };
return new OkObjectResult(result);
}

/// <summary>
Expand Down

0 comments on commit 7f8c9b9

Please sign in to comment.