diff --git a/lnbits/extensions/lnurlp/lnurl.py b/lnbits/extensions/lnurlp/lnurl.py index 8f6aa623..3f7df926 100644 --- a/lnbits/extensions/lnurlp/lnurl.py +++ b/lnbits/extensions/lnurlp/lnurl.py @@ -18,12 +18,7 @@ from .crud import increment_pay_link @lnurlp_ext.get( - "/api/v1/lnurl/{link_id}", # Backwards compatibility for old LNURLs / QR codes (with long URL) - status_code=HTTPStatus.OK, - name="lnurlp.api_lnurl_response.deprecated", -) -@lnurlp_ext.get( - "/{link_id}", + "/api/v1/lnurl/{link_id}", status_code=HTTPStatus.OK, name="lnurlp.api_lnurl_response", ) diff --git a/lnbits/extensions/lnurlp/static/js/index.js b/lnbits/extensions/lnurlp/static/js/index.js index c1372bec..1713e77f 100644 --- a/lnbits/extensions/lnurlp/static/js/index.js +++ b/lnbits/extensions/lnurlp/static/js/index.js @@ -17,7 +17,7 @@ var mapPayLink = obj => { ) obj.amount = new Intl.NumberFormat(LOCALE).format(obj.amount) obj.print_url = [locationPath, 'print/', obj.id].join('') - obj.pay_url = [locationPath, 'link/', obj.id].join('') + obj.pay_url = [locationPath, obj.id].join('') return obj } diff --git a/lnbits/extensions/lnurlp/views.py b/lnbits/extensions/lnurlp/views.py index c5fa3582..9bc78056 100644 --- a/lnbits/extensions/lnurlp/views.py +++ b/lnbits/extensions/lnurlp/views.py @@ -21,7 +21,7 @@ async def index(request: Request, user: User = Depends(check_user_exists)): ) -@lnurlp_ext.get("/link/{link_id}", response_class=HTMLResponse) +@lnurlp_ext.get("/{link_id}", response_class=HTMLResponse) async def display(request: Request, link_id): link = await get_pay_link(link_id) if not link: