git add .
git commit -m "feat: improve wheel UI with gold pointer and center circle sync"
This commit is contained in:
@@ -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.critical(f"Unexpected error fetching items: {e}")
|
||||
logger.error(f"Error fetching items: {e}")
|
||||
raise
|
||||
|
||||
|
||||
@@ -38,26 +38,4 @@ def get_items(db: Session = Depends(get_db)):
|
||||
def spin(db: Session = Depends(get_db)):
|
||||
try:
|
||||
winner = crud.spin_wheel(db)
|
||||
|
||||
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
|
||||
if not winner:
|
||||
Reference in New Issue
Block a user