2018-05-15 01:18:26 +02:00
|
|
|
|
using System.Globalization;
|
|
|
|
|
using Geekbot.net.Lib;
|
2018-05-14 02:33:49 +02:00
|
|
|
|
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(),
|
2018-05-15 01:18:26 +02:00
|
|
|
|
ApiVersion = Constants.ApiVersion.ToString(CultureInfo.InvariantCulture),
|
2018-05-14 02:33:49 +02:00
|
|
|
|
Status = "Online"
|
|
|
|
|
};
|
|
|
|
|
return Ok(responseBody);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|