git add .

git commit -m "feat: improve wheel UI with gold pointer and center circle sync"
This commit is contained in:
2026-05-30 13:16:11 +03:30
parent c4c4e92e05
commit 1618580439
27 changed files with 1158 additions and 140 deletions

View File

@@ -29,7 +29,7 @@ def get_items(db: Session = Depends(get_db)):
logger.info(f"User fetched items: {len(items)} items")
return items
except Exception as e:
logger.error(f"Error fetching items: {e}")
logger.critical(f"Unexpected error fetching items: {e}")
raise
@@ -38,4 +38,26 @@ def get_items(db: Session = Depends(get_db)):
def spin(db: Session = Depends(get_db)):
try:
winner = crud.spin_wheel(db)
if not winner:
if not winner:
logger.warning("Spin attempted but no items available")
raise HTTPException(
status_code=400,
detail="No items available"
)
logger.info(f"Spin result: {winner.title}")
return {
"winner": {
"id": winner.id,
"title": winner.title
}
}
except HTTPException:
raise
except Exception as e:
logger.critical(f"Unexpected error during spin: {e}")
raise