From 91fc989eea5ee16c2f000064b5c040a6fe6f23b9 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Thu, 16 May 2019 01:10:10 +0200 Subject: Implement tokens --- DSACore/Controllers/LobbyController.cs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 DSACore/Controllers/LobbyController.cs (limited to 'DSACore/Controllers/LobbyController.cs') diff --git a/DSACore/Controllers/LobbyController.cs b/DSACore/Controllers/LobbyController.cs new file mode 100644 index 0000000..a946184 --- /dev/null +++ b/DSACore/Controllers/LobbyController.cs @@ -0,0 +1,32 @@ +using DSACore.Models.Network; +using System; +using Microsoft.AspNetCore.Mvc; + +namespace DSACore.Controllers +{ + public class ScribbleController : Controller + { + [Route("[controller]")] + // GET: api/ + [HttpGet] + public string Get() + { + return "Usage: get /tokens/{Token}"; + } + + [HttpPost] + public string Post([FromBody]Command cmd) + { + try + { + return Commands.CommandHandler.ExecuteCommand(cmd).message; + } + catch (Exception e) + { + return $"Ein Fehler ist aufgetreten: \n {e.Message}"; + } + + } + + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2