Skip to content
Snippets Groups Projects

Topic/1176 current version api

Merged Marcel Nellesen requested to merge Topic/1176-currentVersionApi into Product/745-currentVersions
Files
3
@@ -8,17 +8,28 @@ using System.Linq;
namespace Coscine.Api.Version.Controllers
{
/// <summary>
/// This controller represents the actions which can be taken with a version object.
/// </summary>
public class VersionController : Controller
{
private readonly IConfiguration _configuration;
/// <summary>
/// VersionController specifying the configuration.
/// </summary>
/// <param name="logger"></param>
public VersionController(ILogger<VersionController> logger)
{
_configuration = Program.Configuration;
}
/// <summary>
/// Returns the Versions and Ports
/// </summary>
/// <returns>Versions as Json</returns>
[HttpGet("[controller]/versions")]
public IActionResult Versions()
{
@@ -32,6 +43,12 @@ namespace Coscine.Api.Version.Controllers
return Json(Versions);
}
/// <summary>
/// This method returns the versions and ports
/// </summary>
/// <param name="name">name </param>
/// <returns>versions and ports</returns>
[Route("[controller]")]
public JArray GetEntries(string name)
{
var Infos = new JArray();
Loading