mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-19 20:14:59 +02:00
ran black
This commit is contained in:
@@ -7,4 +7,4 @@ ngrok_ext: Blueprint = Blueprint(
|
||||
"ngrok", __name__, static_folder="static", template_folder="templates"
|
||||
)
|
||||
|
||||
from .views import * # noqa
|
||||
from .views import * # noqa
|
||||
|
@@ -5,27 +5,29 @@ from lnbits.decorators import check_user_exists, validate_uuids
|
||||
from pyngrok import conf, ngrok
|
||||
from . import ngrok_ext
|
||||
|
||||
|
||||
def log_event_callback(log):
|
||||
string = str(log)
|
||||
string2 = string[string.find('url="https'):string.find('url="https')+40]
|
||||
string2 = string[string.find('url="https') : string.find('url="https') + 40]
|
||||
if string2:
|
||||
string3 = string2
|
||||
string4 = string3[4:]
|
||||
global string5
|
||||
string5 = string4.replace( '"', '' )
|
||||
string5 = string4.replace('"', "")
|
||||
|
||||
|
||||
conf.get_default().log_event_callback = log_event_callback
|
||||
|
||||
ngrok_tunnel = ngrok.connect(5000)
|
||||
|
||||
|
||||
@ngrok_ext.route("/")
|
||||
@validate_uuids(["usr"], required=True)
|
||||
@check_user_exists()
|
||||
|
||||
async def index():
|
||||
# row = await db.fetchone("SELECT * FROM ngrok")
|
||||
# row = await db.fetchone("SELECT * FROM ngrok")
|
||||
|
||||
# return row
|
||||
# return "Access and use your lnbits instance here: " + string5
|
||||
# return Ngrok.from_row(row) if row else None
|
||||
# return row
|
||||
# return "Access and use your lnbits instance here: " + string5
|
||||
# return Ngrok.from_row(row) if row else None
|
||||
return await render_template("ngrok/index.html", ngrok=string5)
|
||||
|
Reference in New Issue
Block a user