diff options
Diffstat (limited to 'DSACore/Controllers/LobbyController.cs')
-rw-r--r-- | DSACore/Controllers/LobbyController.cs | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/DSACore/Controllers/LobbyController.cs b/DSACore/Controllers/LobbyController.cs index 7890b4f..41ce436 100644 --- a/DSACore/Controllers/LobbyController.cs +++ b/DSACore/Controllers/LobbyController.cs @@ -1,30 +1,23 @@ using System; -using DSACore.Models.Network; using DSALib.Commands; using DSALib.Models.Network; using Microsoft.AspNetCore.Mvc; -namespace DSACore.Controllers -{ - public class ScribbleController : Controller - { +namespace DSACore.Controllers { + public class ScribbleController : Controller { [Route("[controller]")] // GET: api/<controller> [HttpGet] - public string Get() - { + public string Get() { return "Usage: get /tokens/{Token}"; } [HttpPost] - public string Post([FromBody] Command cmd) - { - try - { + public string Post([FromBody] Command cmd) { + try { return CommandHandler.ExecuteCommand(cmd).message; } - catch (Exception e) - { + catch (Exception e) { return $"Ein Fehler ist aufgetreten: \n {e.Message}"; } } |