info/error if no music is playing yet on jukebox
This commit is contained in:
parent
9b95a7743d
commit
6c0aa8fa8d
1 changed files with 2 additions and 3 deletions
|
|
@ -75,7 +75,6 @@ async def api_check_credentials_check(
|
||||||
juke_id: str = Query(None), wallet: WalletTypeInfo = Depends(require_admin_key)
|
juke_id: str = Query(None), wallet: WalletTypeInfo = Depends(require_admin_key)
|
||||||
):
|
):
|
||||||
jukebox = await get_jukebox(juke_id)
|
jukebox = await get_jukebox(juke_id)
|
||||||
|
|
||||||
return jukebox
|
return jukebox
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -442,7 +441,7 @@ async def api_get_jukebox_currently(
|
||||||
token = await api_get_token(juke_id)
|
token = await api_get_token(juke_id)
|
||||||
if token == False:
|
if token == False:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=HTTPStatus.FORBIDDEN, detail="INvoice not paid"
|
status_code=HTTPStatus.FORBIDDEN, detail="Invoice not paid"
|
||||||
)
|
)
|
||||||
elif retry:
|
elif retry:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|
@ -456,5 +455,5 @@ async def api_get_jukebox_currently(
|
||||||
)
|
)
|
||||||
except:
|
except:
|
||||||
raise HTTPException(
|
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…
Add table
Add a link
Reference in a new issue