Fixed formatting
This commit is contained in:
@@ -43,7 +43,7 @@ async def api_wallet():
|
||||
)
|
||||
|
||||
|
||||
@core_app.put("/api/v1/wallet/<new_name>")
|
||||
@core_app.put("/api/v1/wallet/{new_name}")
|
||||
@api_check_wallet_key("invoice")
|
||||
async def api_update_wallet(new_name: str):
|
||||
await update_wallet(g().wallet.id, new_name)
|
||||
@@ -260,7 +260,7 @@ async def api_payments_pay_lnurl(data: CreateLNURLData):
|
||||
)
|
||||
|
||||
|
||||
@core_app.get("/api/v1/payments/<payment_hash>")
|
||||
@core_app.get("/api/v1/payments/{payment_hash}")
|
||||
@api_check_wallet_key("invoice")
|
||||
async def api_payment(payment_hash):
|
||||
payment = await g().wallet.get_payment(payment_hash)
|
||||
@@ -334,7 +334,7 @@ async def api_payments_sse():
|
||||
return response
|
||||
|
||||
|
||||
@core_app.get("/api/v1/lnurlscan/<code>")
|
||||
@core_app.get("/api/v1/lnurlscan/{code}")
|
||||
@api_check_wallet_key("invoice")
|
||||
async def api_lnurlscan(code: str):
|
||||
try:
|
||||
|
||||
@@ -38,9 +38,9 @@ async def home(request: Request, lightning: str = None):
|
||||
@core_app.get("/extensions")
|
||||
@validate_uuids(["usr"], required=True)
|
||||
@check_user_exists()
|
||||
async def extensions():
|
||||
extension_to_enable = request.args.get("enable", type=str)
|
||||
extension_to_disable = request.args.get("disable", type=str)
|
||||
async def extensions(enable: str, disable: str):
|
||||
extension_to_enable = enable
|
||||
extension_to_disable = disable
|
||||
|
||||
if extension_to_enable and extension_to_disable:
|
||||
abort(
|
||||
@@ -177,7 +177,7 @@ async def deletewallet():
|
||||
return redirect(url_for("core.home"))
|
||||
|
||||
|
||||
@core_app.get("/withdraw/notify/<service>")
|
||||
@core_app.get("/withdraw/notify/{service}")
|
||||
@validate_uuids(["wal"], required=True)
|
||||
async def lnurl_balance_notify(service: str):
|
||||
bc = await get_balance_check(request.args.get("wal"), service)
|
||||
@@ -204,7 +204,7 @@ async def lnurlwallet():
|
||||
return redirect(url_for("core.wallet", usr=user.id, wal=wallet.id))
|
||||
|
||||
|
||||
@core_app.get("/manifest/<usr>.webmanifest")
|
||||
@core_app.get("/manifest/{usr}.webmanifest")
|
||||
async def manifest(usr: str):
|
||||
user = await get_user(usr)
|
||||
if not user:
|
||||
|
||||
@@ -10,7 +10,7 @@ from ..crud import get_standalone_payment
|
||||
from ..tasks import api_invoice_listeners
|
||||
|
||||
|
||||
@core_app.get("/public/v1/payment/<payment_hash>")
|
||||
@core_app.get("/public/v1/payment/{payment_hash}")
|
||||
async def api_public_payment_longpolling(payment_hash):
|
||||
payment = await get_standalone_payment(payment_hash)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user