mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-22 06:21:53 +01:00
Tidied
This commit is contained in:
parent
78ad57f99f
commit
9cb6068dd8
5 changed files with 4 additions and 18 deletions
|
@ -3,7 +3,6 @@ from typing import List, Optional
|
||||||
from . import db
|
from . import db
|
||||||
from .models import Jukebox, JukeboxPayment
|
from .models import Jukebox, JukeboxPayment
|
||||||
from lnbits.helpers import urlsafe_short_hash
|
from lnbits.helpers import urlsafe_short_hash
|
||||||
import json
|
|
||||||
|
|
||||||
|
|
||||||
async def create_jukebox(
|
async def create_jukebox(
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
import json
|
from typing import NamedTuple
|
||||||
import base64
|
|
||||||
import hashlib
|
|
||||||
from collections import OrderedDict
|
|
||||||
from quart import url_for
|
|
||||||
from typing import NamedTuple, Optional, List, Dict
|
|
||||||
from sqlite3 import Row
|
from sqlite3 import Row
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
'GET',
|
'GET',
|
||||||
'/jukebox/api/v1/jukebox/jb/invoicep/' + song_id + '/{{ juke_id }}/' + self.receive.paymentHash)
|
'/jukebox/api/v1/jukebox/jb/invoicep/' + song_id + '/{{ juke_id }}/' + self.receive.paymentHash)
|
||||||
.then(function (response1) {
|
.then(function (response1) {
|
||||||
console.log(response1)
|
|
||||||
if (response1.data[2] == song_id) {
|
if (response1.data[2] == song_id) {
|
||||||
setTimeout(function(){ self.getCurrent() }, 500)
|
setTimeout(function(){ self.getCurrent() }, 500)
|
||||||
self.$q.notify({
|
self.$q.notify({
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
'filla'
|
'filla'
|
||||||
)
|
)
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response.data.paid)
|
|
||||||
self.paid = response.data.paid
|
self.paid = response.data.paid
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
'/jukebox/api/v1/jukebox/jb/currently/{{juke_id}}')
|
'/jukebox/api/v1/jukebox/jb/currently/{{juke_id}}')
|
||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
if (res.data.id) {
|
if (res.data.id) {
|
||||||
console.log(res.data)
|
|
||||||
self.currentlyPlaying = res.data
|
self.currentlyPlaying = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -5,13 +5,11 @@ from http import HTTPStatus
|
||||||
import trio
|
import trio
|
||||||
from lnbits.decorators import check_user_exists, validate_uuids
|
from lnbits.decorators import check_user_exists, validate_uuids
|
||||||
from lnbits.core.models import Payment
|
from lnbits.core.models import Payment
|
||||||
from functools import wraps
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from . import jukebox_ext
|
from . import jukebox_ext
|
||||||
from .crud import get_jukebox
|
from .crud import get_jukebox
|
||||||
from .views_api import api_get_jukebox_device_check
|
from .views_api import api_get_jukebox_device_check
|
||||||
from urllib.parse import unquote
|
|
||||||
|
|
||||||
|
|
||||||
@jukebox_ext.route("/")
|
@jukebox_ext.route("/")
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
from quart import g, jsonify, request
|
from quart import g, jsonify, request
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from lnurl.exceptions import InvalidUrl as LnurlInvalidUrl # type: ignore
|
|
||||||
from base64 import urlsafe_b64encode
|
|
||||||
import base64
|
import base64
|
||||||
import json
|
|
||||||
import time
|
|
||||||
from lnbits.core.crud import get_wallet
|
from lnbits.core.crud import get_wallet
|
||||||
from lnbits.core.services import create_invoice, check_invoice_status
|
from lnbits.core.services import create_invoice, check_invoice_status
|
||||||
|
|
||||||
|
@ -15,14 +11,12 @@ from .crud import (
|
||||||
create_jukebox,
|
create_jukebox,
|
||||||
update_jukebox,
|
update_jukebox,
|
||||||
get_jukebox,
|
get_jukebox,
|
||||||
get_jukebox_by_user,
|
|
||||||
get_jukeboxs,
|
get_jukeboxs,
|
||||||
delete_jukebox,
|
delete_jukebox,
|
||||||
create_jukebox_payment,
|
create_jukebox_payment,
|
||||||
get_jukebox_payment,
|
get_jukebox_payment,
|
||||||
update_jukebox_payment,
|
update_jukebox_payment,
|
||||||
)
|
)
|
||||||
from .models import Jukebox
|
|
||||||
from lnbits.core.services import create_invoice, check_invoice_status
|
from lnbits.core.services import create_invoice, check_invoice_status
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue