Replace nancy with kestrel

This commit is contained in:
runebaas 2018-05-14 02:33:49 +02:00
parent 3004b19209
commit 8c107de92e
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
13 changed files with 222 additions and 117 deletions

View file

@ -0,0 +1,9 @@
namespace Geekbot.net.WebApi.Controllers.Status
{
public class ApiStatusDto
{
public string GeekbotVersion { get; set; }
public string ApiVersion { get; set; }
public string Status { get; set; }
}
}

View file

@ -0,0 +1,22 @@
using Geekbot.net.Lib;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
namespace Geekbot.net.WebApi.Controllers.Status
{
[EnableCors("AllowSpecificOrigin")]
public class StatusController : Controller
{
[Route("/")]
public IActionResult GetCommands()
{
var responseBody = new ApiStatusDto
{
GeekbotVersion = Constants.BotVersion(),
ApiVersion = Constants.ApiVersion.ToString(),
Status = "Online"
};
return Ok(responseBody);
}
}
}