Skip to content

Commit

Permalink
feat(api): add get_board route
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious committed Jun 22, 2023
1 parent 1000885 commit 285195b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions invokeai/app/api/routers/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ async def create_board(
raise HTTPException(status_code=500, detail="Failed to create board")


@boards_router.get("/{board_id}", operation_id="get_board", response_model=BoardDTO)
async def get_board(
board_id: str = Path(description="The id of board to get"),
) -> BoardDTO:
"""Gets a board"""

try:
result = ApiDependencies.invoker.services.boards.get_dto(board_id=board_id)
return result
except Exception as e:
raise HTTPException(status_code=404, detail="Board not found")


@boards_router.patch(
"/{board_id}",
operation_id="update_board",
Expand Down

0 comments on commit 285195b

Please sign in to comment.