test redirects
This commit is contained in:
parent
a665714978
commit
afd1cece0b
2 changed files with 11 additions and 9 deletions
|
|
@ -20,11 +20,8 @@ lnurlp_static_files = [
|
||||||
|
|
||||||
lnurlp_redirect_paths = [
|
lnurlp_redirect_paths = [
|
||||||
{
|
{
|
||||||
"from_path": "/.well-known/lnurlp",
|
"from_path": "/.well-known/lnurlp/",
|
||||||
"redirect_to_path": "/api/v1/well-known",
|
"redirect_to_path": "/api/v1/well-known/{username}",
|
||||||
"header_filters": {
|
|
||||||
"accept": "application/lnurlp+json"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
13
views_api.py
13
views_api.py
|
|
@ -23,10 +23,15 @@ from .models import CreatePayLinkData
|
||||||
from .lnurl import lnurl_response
|
from .lnurl import lnurl_response
|
||||||
|
|
||||||
@lnurlp_ext.get("/api/v1/well-known/{username}")
|
@lnurlp_ext.get("/api/v1/well-known/{username}")
|
||||||
async def lnaddress(username: str, request: Request):
|
async def lnaddress(username: str):
|
||||||
print("calling /api/v1/well-known")
|
msg = "calling /api/v1/well-known" + username
|
||||||
domain = urlparse(str(request.url)).netloc
|
return msg
|
||||||
return await lnurl_response(username, domain, request)
|
|
||||||
|
# @lnurlp_ext.get("/api/v1/well-known/{username}")
|
||||||
|
# async def lnaddress(username: str, request: Request):
|
||||||
|
# print("calling /api/v1/well-known")
|
||||||
|
# domain = urlparse(str(request.url)).netloc
|
||||||
|
# return await lnurl_response(username, domain, request)
|
||||||
|
|
||||||
|
|
||||||
@lnurlp_ext.get("/api/v1/currencies")
|
@lnurlp_ext.get("/api/v1/currencies")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue