Complete genres and actors

This commit is contained in:
2024-07-06 20:08:30 +04:00
parent b9e22fcc4c
commit 4c0bdcbd6a
9 changed files with 33 additions and 36 deletions

View File

@@ -14,16 +14,11 @@ async def get_game(game_id: int, db_session: AsyncSession = Depends(Database.get
return await GamesCRUD.get(db_session, game_id)
@games_router.get("/cards", response_model=list[GameCard])
@games_router.get("", response_model=list[GameCard])
async def get_games_cards(db_session: AsyncSession = Depends(Database.get_session)):
return await GamesCRUD.get_all(db_session)
@games_router.get("", response_model=list[Game])
async def get_games(db_session: AsyncSession = Depends(Database.get_session)):
return await GamesCRUD.get_all(db_session)
@games_router.post("", response_model=Game)
async def add_game(game: GameCreate,
user: User = Depends(get_user),