Refactoring

This commit is contained in:
Veljko Tosic
2026-02-19 14:13:34 +01:00
parent 7177446470
commit 83db13ef53
4 changed files with 12 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ public class DeleteWhiteboardCommandHandler : ICommandHandler<DeleteWhiteboardCo
throw new ValidationException(WhiteboardErrors.NotFound(whiteboardId));
}
if (!whiteboard.IsOwnedBy(userId))
if (!whiteboard.CanUserDelete(userId))
{
throw new ValidationException(WhiteboardErrors.OnlyOwnerCanDeleteWhiteboard(userId));
}