Soft deleting whiteboards

This commit is contained in:
Veljko Tosic
2026-02-19 00:21:55 +01:00
parent c4ab8aa53e
commit c99aaa1062
7 changed files with 96 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
using AipsCore.Application.Abstract;
using AipsCore.Application.Models.Whiteboard.Command.CreateWhiteboard;
using AipsCore.Application.Models.Whiteboard.Command.DeleteWhiteboard;
using AipsCore.Application.Models.Whiteboard.Query.GetRecentWhiteboards;
using AipsCore.Application.Models.Whiteboard.Query.GetWhiteboard;
using AipsCore.Application.Models.Whiteboard.Query.GetWhiteboardHistory;
@@ -41,6 +42,15 @@ public class WhiteboardController : ControllerBase
return Ok(whiteboard);
}
[Authorize]
[HttpDelete("{whiteboardId}")]
public async Task<ActionResult> DeleteWhiteboard([FromRoute] string whiteboardId, CancellationToken cancellationToken)
{
await _dispatcher.Execute(new DeleteWhiteboardCommand(whiteboardId), cancellationToken);
return Ok();
}
[Authorize]
[HttpGet("history")]
public async Task<ActionResult<ICollection<Whiteboard>>> GetWhiteboardHistory(CancellationToken cancellationToken)