blob: 7890b4fdf7da68da57725dc6eae550a204e06cd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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}";
}
}
}
}
|