aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
+ }
+}