28 lines
904 B
C#
28 lines
904 B
C#
using System.Configuration;
|
|
using System.Reflection;
|
|
using System.Web.Http;
|
|
using Interfaces;
|
|
|
|
namespace WindowsDataCenter
|
|
{
|
|
[RoutePrefix("api/app")]
|
|
public class ApplicationController:ApiController
|
|
{
|
|
[Route("")]
|
|
public IHttpActionResult GetAppDetails()
|
|
{
|
|
var ninjectHelper = NinjectHelper.GetInstance();
|
|
var appDetails = new AppDetails
|
|
{
|
|
ApplicationName = "Flexitime Tracker",
|
|
DataBaseProvider = ninjectHelper.Get<IRepository>().GetType().ToString(),
|
|
LoggerProvider = ninjectHelper.Get<ILogger>().GetType().ToString(),
|
|
Version = Assembly.GetEntryAssembly().GetName().Version.ToString(),
|
|
ErrorEmailAddress = ConfigurationManager.AppSettings["BugSubmissionEmailAddress"] ?? "NONE"
|
|
};
|
|
|
|
return Ok(appDetails);
|
|
}
|
|
}
|
|
}
|