Split Geekbot.net into src/Bot, src/Core, and src/Web

This commit is contained in:
runebaas 2020-08-08 22:24:01 +02:00
parent 7b6dd2d2f9
commit fc0af492ad
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
197 changed files with 542 additions and 498 deletions

View file

@ -0,0 +1,9 @@
namespace Geekbot.Web.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,23 @@
using System.Globalization;
using Geekbot.Core;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
namespace Geekbot.Web.Controllers.Status
{
[EnableCors("AllowSpecificOrigin")]
public class StatusController : Controller
{
[Route("/")]
public IActionResult GetCommands()
{
var responseBody = new ApiStatusDto
{
GeekbotVersion = Constants.BotVersion(),
ApiVersion = Constants.ApiVersion.ToString(CultureInfo.InvariantCulture),
Status = "Online"
};
return Ok(responseBody);
}
}
}