diff options
author | natrixaeria <janng@gmx.de> | 2019-05-17 21:02:08 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-05-17 21:02:08 +0200 |
commit | bc74dde4dd7cf40216de4f0aae9a1b9ddf5e044b (patch) | |
tree | c1c7f759645417989f15f9716efbf68a8f1d3a6d /DSACore/Controllers/LobbyController.cs | |
parent | 921d023a7652be5b1232ac41aeb2646b5f83ceb5 (diff) | |
parent | aad1d69b5e2bb0c82f657f7693462fd95a91fb9f (diff) |
Merge branch 'scribble' of https://github.com/TrueDoctor/DiscoBot into scribble
Diffstat (limited to 'DSACore/Controllers/LobbyController.cs')
-rw-r--r-- | DSACore/Controllers/LobbyController.cs | 32 |
1 files changed, 32 insertions, 0 deletions
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/<controller> + [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 |