mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 20:30:38 +04:00
Complete genres and actors
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user