add redirect paths

This commit is contained in:
bitkarrot 2023-03-02 22:10:18 -08:00
commit 1176fd0322
2 changed files with 18 additions and 0 deletions

View file

@ -1,6 +1,7 @@
import json
from asyncio.log import logger
from http import HTTPStatus
from urllib.parse import urlparse
from fastapi import Depends, Query, Request
from lnurl.exceptions import InvalidUrl as LnurlInvalidUrl
@ -19,6 +20,12 @@ from .crud import (
update_pay_link,
)
from .models import CreatePayLinkData
from .lnurl import lnurl_response
@lnurlp_ext.get("/api/v1/well-known/{username}")
async def lnaddress(username: str, request: Request):
domain = urlparse(str(request.url)).netloc
return await lnurl_response(username, domain, request)
@lnurlp_ext.get("/api/v1/currencies")