can't seem to make url_for work

This commit is contained in:
Tiago vasconcelos
2021-10-06 11:10:24 +01:00
parent 81826f3c13
commit 7646bbefd5
4 changed files with 17 additions and 16 deletions
+3 -4
View File
@@ -37,10 +37,9 @@ class PayLink(BaseModel):
data = dict(row)
return cls(**data)
@property
def lnurl(self) -> str:
r = Request
url = r.url_for("lnurlp.api_lnurl_response", link_id=self.id, _external=True)
def lnurl(self, req: Request) -> str:
url = req.url_for("lnurlp.api_lnurl_response", link_id=self.id)
return lnurl_encode(url)
@property