diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/Interfaces.csproj b/DataCenter_Windows/WindowsDataCenter/Interfaces/Interfaces.csproj index 5dec2a9..90c1283 100644 --- a/DataCenter_Windows/WindowsDataCenter/Interfaces/Interfaces.csproj +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/Interfaces.csproj @@ -40,6 +40,7 @@ + diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Controllers/ApplicationController.cs b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Controllers/ApplicationController.cs new file mode 100644 index 0000000..e9835fd --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Controllers/ApplicationController.cs @@ -0,0 +1,27 @@ +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().GetType().ToString(), + LoggerProvider = ninjectHelper.Get().GetType().ToString(), + Version = Assembly.GetEntryAssembly().GetName().Version.ToString(), + ErrorEmailAddress = ConfigurationManager.AppSettings["BugSubmissionEmailAddress"] ?? "NONE" + }; + + return Ok(appDetails); + } + } +} diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/WindowsDataCenter.csproj b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/WindowsDataCenter.csproj index 03cfb28..518c4da 100644 --- a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/WindowsDataCenter.csproj +++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/WindowsDataCenter.csproj @@ -147,6 +147,7 @@ +