feat: common style for crud endpoints

This commit is contained in:
2025-08-23 10:37:42 +04:00
parent c5e4dea52c
commit c862544ae0
9 changed files with 37 additions and 37 deletions

View File

@ -41,25 +41,25 @@ async def create_board(
@board_router.patch(
"/{boardId}",
"/{pk}",
response_model=UpdateBoardResponse,
operation_id="update_board",
)
async def update_board(
session: SessionDependency,
request: UpdateBoardRequest,
board_id: int = Path(alias="boardId"),
pk: int = Path(),
):
return await BoardService(session).update_board(board_id, request)
return await BoardService(session).update_board(pk, request)
@board_router.delete(
"/{boardId}",
"/{pk}",
response_model=DeleteBoardResponse,
operation_id="delete_board",
)
async def delete_board(
session: SessionDependency,
board_id: int = Path(alias="boardId"),
pk: int = Path(),
):
return await BoardService(session).delete_board(board_id)
return await BoardService(session).delete_board(pk)