feat: board deletion endpoint

This commit is contained in:
2025-08-07 10:12:54 +04:00
parent 734099165b
commit 2fed828768
4 changed files with 43 additions and 1 deletions

View File

@ -7,6 +7,7 @@ from schemas.board import (
UpdateBoardResponse,
CreateBoardResponse,
CreateBoardRequest,
DeleteBoardResponse,
)
from services import BoardService
@ -50,3 +51,15 @@ async def update_board(
board_id: int = Path(alias="boardId"),
):
return await BoardService(session).update_board(board_id, request)
@board_router.delete(
"/{boardId}",
response_model=DeleteBoardResponse,
operation_id="delete_board",
)
async def delete_board(
session: SessionDependency,
board_id: int = Path(alias="boardId"),
):
return await BoardService(session).delete_board(board_id)