summaryrefslogtreecommitdiff
path: root/DSACore/Controllers/LobbyController.cs
diff options
context:
space:
mode:
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..7890b4f
--- /dev/null
+++ b/DSACore/Controllers/LobbyController.cs
@@ -0,0 +1,32 @@
+using System;
+using DSACore.Models.Network;
+using DSALib.Commands;
+using DSALib.Models.Network;
+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 CommandHandler.ExecuteCommand(cmd).message;
+ }
+ catch (Exception e)
+ {
+ return $"Ein Fehler ist aufgetreten: \n {e.Message}";
+ }
+ }
+ }
+} \ No newline at end of file