mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-01-19 05:33:47 +01:00
fix url_for no allowing query params
This commit is contained in:
parent
e8882645c4
commit
2485e8eabf
@ -36,8 +36,8 @@ async def get_livestream(ls_id: int) -> Optional[Livestream]:
|
||||
async def get_livestream_by_track(track_id: int) -> Optional[Livestream]:
|
||||
row = await db.fetchone(
|
||||
"""
|
||||
SELECT livestreams.* FROM livestream.livestreams
|
||||
INNER JOIN tracks ON tracks.livestream = livestreams.id
|
||||
SELECT livestreams.* AS livestreams FROM livestream.livestreams
|
||||
INNER JOIN livestream.tracks AS tracks ON tracks.livestream = livestreams.id
|
||||
WHERE tracks.id = ?
|
||||
""",
|
||||
(track_id,),
|
||||
|
@ -75,10 +75,11 @@ class Track(BaseModel):
|
||||
if not self.download_url:
|
||||
return None
|
||||
|
||||
url = request.url_for("livestream.track_redirect_download", track_id=self.id)
|
||||
url_with_query = f"{url}?p={payment_hash}"
|
||||
|
||||
return UrlAction(
|
||||
url=request.url_for(
|
||||
"livestream.track_redirect_download", track_id=self.id, p=payment_hash
|
||||
),
|
||||
url=url_with_query,
|
||||
description=f"Download the track {self.name}!",
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user