aboutsummaryrefslogtreecommitdiff
path: root/Controllers/ApiController.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2024-10-25 10:26:56 +1100
committerJake Mannens <jake@asger.xyz>2024-10-29 13:03:40 +1100
commita7b9bf93180368d2b42002584bf153f3a58901e9 (patch)
treef833b2af8bc72218f4045616c57b6b0a5e4d7228 /Controllers/ApiController.cs
parentb39dc97286456159a99b8afcdfdb6e0aae759495 (diff)
Initial commitApiController
Diffstat (limited to 'Controllers/ApiController.cs')
-rw-r--r--Controllers/ApiController.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Controllers/ApiController.cs b/Controllers/ApiController.cs
new file mode 100644
index 0000000..2d11e6f
--- /dev/null
+++ b/Controllers/ApiController.cs
@@ -0,0 +1,15 @@
+using Microsoft.AspNetCore.Mvc;
+
+namespace PagerParser.Controllers;
+
+[ApiController]
+[Route("Api")]
+public class ApiController : Controller {
+ [HttpPost("Message/Parse")]
+ public ParsedPagerMessage? ParseMessage(
+ IPagerMessageParserService parserService,
+ [FromBody] string message) {
+
+ return parserService.TryParse(message);
+ }
+}