From a7b9bf93180368d2b42002584bf153f3a58901e9 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Fri, 25 Oct 2024 10:26:56 +1100 Subject: Initial commit --- Controllers/ApiController.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Controllers/ApiController.cs 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); + } +} -- cgit v1.3