change link url as well
This commit is contained in:
parent
9e953bc3e1
commit
4dc94bba7d
3 changed files with 3 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ from .crud import increment_pay_link
|
||||||
name="lnurlp.api_lnurl_response.deprecated",
|
name="lnurlp.api_lnurl_response.deprecated",
|
||||||
)
|
)
|
||||||
@lnurlp_ext.get(
|
@lnurlp_ext.get(
|
||||||
"/a/{link_id}",
|
"/{link_id}",
|
||||||
status_code=HTTPStatus.OK,
|
status_code=HTTPStatus.OK,
|
||||||
name="lnurlp.api_lnurl_response",
|
name="lnurlp.api_lnurl_response",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ var mapPayLink = obj => {
|
||||||
)
|
)
|
||||||
obj.amount = new Intl.NumberFormat(LOCALE).format(obj.amount)
|
obj.amount = new Intl.NumberFormat(LOCALE).format(obj.amount)
|
||||||
obj.print_url = [locationPath, 'print/', obj.id].join('')
|
obj.print_url = [locationPath, 'print/', obj.id].join('')
|
||||||
obj.pay_url = [locationPath, obj.id].join('')
|
obj.pay_url = [locationPath, 'link/', obj.id].join('')
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ async def index(request: Request, user: User = Depends(check_user_exists)):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@lnurlp_ext.get("/{link_id}", response_class=HTMLResponse)
|
@lnurlp_ext.get("/link/{link_id}", response_class=HTMLResponse)
|
||||||
async def display(request: Request, link_id):
|
async def display(request: Request, link_id):
|
||||||
link = await get_pay_link(link_id)
|
link = await get_pay_link(link_id)
|
||||||
if not link:
|
if not link:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue