summaryrefslogtreecommitdiff
path: root/DSACore/Controllers/LobbyController.cs
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2019-05-16 01:10:10 +0200
committerDennis Kobert <d-kobert@web.de>2019-05-16 01:10:10 +0200
commit91fc989eea5ee16c2f000064b5c040a6fe6f23b9 (patch)
tree2cb29d1bc191cbba9aab216620a4a644b1f6d806 /DSACore/Controllers/LobbyController.cs
parent6d988d13f7fc1652e2d041cfd1c4b40dce6a8adb (diff)
Implement tokens
Diffstat (limited to 'DSACore/Controllers/LobbyController.cs')
-rw-r--r--DSACore/Controllers/LobbyController.cs32
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