Skip to content

Commit

Permalink
(backend): Create print_resume endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
renanstn committed Dec 13, 2023
1 parent 319a576 commit 162df70
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,13 @@ async def generate_teams(game_id: int, db: Session = Depends(get_db)):
db.commit()

return {"message": "Teams generated!"}

@app.get("/print_resume")
async def print_resume(self, game_id: int, db: Session = Depends(get_db)):
"""
Generate the game resume as a PDF file.
"""
# Check if game exists
game = db.query(models.Game).filter(models.Game.id == game_id).first()
if not game:
return {"message": f"Game id {game_id} not found."}

0 comments on commit 162df70

Please sign in to comment.