Bare bones controller for testing domain entity persistance
This commit is contained in:
17
dotnet/AipsWebApi/Controllers/WhiteboardController.cs
Normal file
17
dotnet/AipsWebApi/Controllers/WhiteboardController.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using AipsCore.Application.Abstract;
|
||||
using AipsCore.Application.Models.Whiteboard.Command.CreateWhiteboard;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace AipsWebApi.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class WhiteboardController : ControllerBase
|
||||
{
|
||||
[HttpPost]
|
||||
public async Task<ActionResult<int>> CreateWhiteboard(CreateWhiteboardCommand command, IDispatcher dispatcher, CancellationToken cancellationToken)
|
||||
{
|
||||
var whiteboardId = await dispatcher.Execute(command, cancellationToken);
|
||||
return Ok(whiteboardId.IdValue);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user