mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 02:28:10 +01:00
info/error if no music is playing yet on jukebox
This commit is contained in:
parent
9b95a7743d
commit
6c0aa8fa8d
@ -75,7 +75,6 @@ async def api_check_credentials_check(
|
||||
juke_id: str = Query(None), wallet: WalletTypeInfo = Depends(require_admin_key)
|
||||
):
|
||||
jukebox = await get_jukebox(juke_id)
|
||||
|
||||
return jukebox
|
||||
|
||||
|
||||
@ -442,7 +441,7 @@ async def api_get_jukebox_currently(
|
||||
token = await api_get_token(juke_id)
|
||||
if token == False:
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.FORBIDDEN, detail="INvoice not paid"
|
||||
status_code=HTTPStatus.FORBIDDEN, detail="Invoice not paid"
|
||||
)
|
||||
elif retry:
|
||||
raise HTTPException(
|
||||
@ -456,5 +455,5 @@ async def api_get_jukebox_currently(
|
||||
)
|
||||
except:
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.NOT_FOUND, detail="Something went wrong"
|
||||
status_code=HTTPStatus.NOT_FOUND, detail="Something went wrong, or no song is playing yet"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user