geekbot/Geekbot.net/WebApi/StatusController.cs
2018-04-30 23:44:19 +02:00

29 lines
No EOL
750 B
C#

using Geekbot.net.Lib;
using Nancy;
namespace Geekbot.net.WebApi
{
public class StatusController : NancyModule
{
public StatusController()
{
Get("/", args =>
{
var responseBody = new ApiStatusDto
{
GeekbotVersion = Constants.BotVersion.ToString(),
ApiVersion = Constants.ApiVersion.ToString(),
Status = "Online"
};
return Response.AsJson(responseBody);
});
}
}
public class ApiStatusDto
{
public string GeekbotVersion { get; set; }
public string ApiVersion { get; set; }
public string Status { get; set; }
}
}