create rect command fix

This commit is contained in:
2026-02-12 09:49:15 +01:00
parent b0f5f38412
commit 3f87964309
3 changed files with 58 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
using AipsCore.Application.Abstract;
using AipsCore.Application.Models.Shape.Command.CreateRectangle;
using Microsoft.AspNetCore.Mvc;
namespace AipsWebApi.Controllers;
[ApiController]
[Route("[controller]")]
public class ShapeController : ControllerBase
{
private readonly IDispatcher _dispatcher;
public ShapeController(IDispatcher dispatcher)
{
_dispatcher = dispatcher;
}
[HttpPost("rectangle")]
public async Task<ActionResult<int>> CreateRectangle(CreateRectangleCommand command, CancellationToken token)
{
var result = await _dispatcher.Execute(command, token);
return Ok(result);
}
}