GitHub Action commited on
Commit
bd43a11
·
1 Parent(s): d2ee7b7

deploy from github actions

Browse files
Files changed (2) hide show
  1. app/routers/alabanza.py +5 -1
  2. app/routers/songs.py +2 -0
app/routers/alabanza.py CHANGED
@@ -838,6 +838,7 @@ def get_grupo_pistas(grupo_id: int, db: Session = Depends(get_db), current_user:
838
  raise HTTPException(status_code=403, detail="No tienes permisos para ver las pistas de este grupo")
839
 
840
  tasks = db.query(Task).filter(Task.groups_shared.any(Group.id == grupo_id)).all()
 
841
  return [
842
  {
843
  "id": t.id,
@@ -851,7 +852,10 @@ def get_grupo_pistas(grupo_id: int, db: Session = Depends(get_db), current_user:
851
  "created_at": t.created_at.isoformat() if t.created_at else None,
852
  "user_id": t.user_id,
853
  "username": t.user.username if t.user else "Desconocido",
854
- "has_telegram": bool(t.telegram_file_ids)
 
 
 
855
  }
856
  for t in tasks
857
  ]
 
838
  raise HTTPException(status_code=403, detail="No tienes permisos para ver las pistas de este grupo")
839
 
840
  tasks = db.query(Task).filter(Task.groups_shared.any(Group.id == grupo_id)).all()
841
+ import json as _json
842
  return [
843
  {
844
  "id": t.id,
 
852
  "created_at": t.created_at.isoformat() if t.created_at else None,
853
  "user_id": t.user_id,
854
  "username": t.user.username if t.user else "Desconocido",
855
+ "has_telegram": bool(t.telegram_file_ids),
856
+ "bpm": t.bpm,
857
+ "beats": _json.loads(t.beats) if t.beats else [],
858
+ "chords": _json.loads(t.chords) if t.chords else None
859
  }
860
  for t in tasks
861
  ]
app/routers/songs.py CHANGED
@@ -787,6 +787,8 @@ async def historial_canciones(
787
  "missing_stems_for_me": missing_stems_for_me,
788
  "cloud_expires_at": t.cloud_expires_at.isoformat() if t.cloud_expires_at else None,
789
  "cloud_url": t.cloud_url,
 
 
790
  })
791
 
792
  return {
 
787
  "missing_stems_for_me": missing_stems_for_me,
788
  "cloud_expires_at": t.cloud_expires_at.isoformat() if t.cloud_expires_at else None,
789
  "cloud_url": t.cloud_url,
790
+ "bpm": t.bpm,
791
+ "beats": _json.loads(t.beats) if t.beats else []
792
  })
793
 
794
  return {