geekbot/Geekbot.net/WebApi/StatusController.cs

29 lines
750 B
C#
Raw Normal View History

2018-04-30 23:44:19 +02:00
using Geekbot.net.Lib;
using Nancy;
namespace Geekbot.net.WebApi
{
public class StatusController : NancyModule
{
public StatusController()
{
Get("/", args =>
{
2018-04-30 23:44:19 +02:00
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; }
}
}