Merge branch 'main' into hotfix-create-rectangle

# Conflicts:
#	dotnet/AipsWebApi/Controllers/ShapeController.cs
This commit is contained in:
2026-02-12 09:52:55 +01:00
11 changed files with 228 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
using AipsCore.Application.Abstract;
using AipsCore.Application.Models.Shape.Command.CreateRectangle;
using AipsCore.Application.Models.Shape.Command.CreateArrow;
using AipsCore.Application.Models.Shape.Command.CreateLine;
using AipsCore.Application.Models.Shape.Command.CreateTextShape;
using Microsoft.AspNetCore.Mvc;
namespace AipsWebApi.Controllers;
@@ -21,4 +24,25 @@ public class ShapeController : ControllerBase
var result = await _dispatcher.Execute(command, token);
return Ok(result);
}
[HttpPost("arrow")]
public async Task<IActionResult> CreateArrow(CreateArrowCommand command, CancellationToken cancellationToken)
{
var result = await _dispatcher.Execute(command, cancellationToken);
return Ok(result);
}
[HttpPost("textShape")]
public async Task<IActionResult> CreateTextShape(CreateTextShapeCommand command, CancellationToken cancellationToken)
{
var result = await _dispatcher.Execute(command, cancellationToken);
return Ok(result);
}
[HttpPost("line")]
public async Task<IActionResult> CreateLine(CreateLineCommand command, CancellationToken cancellationToken)
{
var result = await _dispatcher.Execute(command, cancellationToken);
return Ok(result);
}
}