Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using System.Reflection;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;

namespace O2NextGen.ESender.Api.Controllers
{
[AllowAnonymous]
public class VersionController : ControllerBase
{
#region Fields

private readonly IHostingEnvironment _environment;

#endregion


#region Ctors

public VersionController(IHostingEnvironment environment)
{
_environment = environment;
}

#endregion

[HttpGet("[controller]")]
public object Index()
{
var exVersion = Assembly.GetExecutingAssembly().GetName().Version;
return new
{
Environment = _environment.EnvironmentName,
Version = exVersion.ToString()
};
}
}
}