2018-04-30 23:44:19 +02:00
|
|
|
|
using Geekbot.net.Lib;
|
|
|
|
|
using Nancy;
|
2017-10-02 21:57:48 +02:00
|
|
|
|
|
2018-05-03 00:56:06 +02:00
|
|
|
|
namespace Geekbot.net.WebApi.Status
|
2017-10-02 21:57:48 +02:00
|
|
|
|
{
|
2017-10-03 00:22:26 +02:00
|
|
|
|
public class StatusController : NancyModule
|
2017-10-02 21:57:48 +02:00
|
|
|
|
{
|
2017-10-03 00:22:26 +02:00
|
|
|
|
public StatusController()
|
2017-10-02 21:57:48 +02:00
|
|
|
|
{
|
|
|
|
|
Get("/", args =>
|
|
|
|
|
{
|
2018-04-30 23:44:19 +02:00
|
|
|
|
var responseBody = new ApiStatusDto
|
2017-10-02 21:57:48 +02:00
|
|
|
|
{
|
2018-05-06 03:24:09 +02:00
|
|
|
|
GeekbotVersion = Constants.BotVersion(),
|
2017-10-03 00:22:26 +02:00
|
|
|
|
ApiVersion = Constants.ApiVersion.ToString(),
|
2017-10-02 21:57:48 +02:00
|
|
|
|
Status = "Online"
|
|
|
|
|
};
|
|
|
|
|
return Response.AsJson(responseBody);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|