This commit is contained in:
Zeeshaun
2026-03-24 15:26:03 -05:00
parent 1e5beb292a
commit 9cc87337b8
333 changed files with 17931 additions and 0 deletions
@@ -0,0 +1,43 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using LCU.Api.Internal.Dispatcher.Services;
namespace LCU.Api.Internal.Dispatcher.Controllers;
[Route("[controller]")]
[ApiController]
public class ExecutionMessageController : ControllerBase
{
private readonly IExecutionMessageService _executionMessageService;
public ExecutionMessageController(IExecutionMessageService executionMessageService)
{
_executionMessageService = executionMessageService;
}
[HttpPost()]
[ProducesResponseType(typeof(List<ExecutionMessage>), 200)]
[ProducesResponseType(400)]
[ProducesResponseType(500)]
public async Task<IActionResult> Post([FromBody] List<ExecutionMessage> request)
{
try
{
if (request == null || !request.Any())
{
return BadRequest("Execution messages are required.");
}
await _executionMessageService.SaveExecutionMessages(request);
return Ok();
}
catch (ServiceException)
{
return StatusCode(StatusCodes.Status500InternalServerError);
}
catch (Exception exception)
{
Log.Error(exception, "Unexpected Exception");
return StatusCode(StatusCodes.Status500InternalServerError);
}
}
}