postgres support.

This commit is contained in:
fiatjaf
2021-07-02 17:34:31 -03:00
parent eeb3e66529
commit 2f309c9863
54 changed files with 624 additions and 540 deletions
+8 -1
View File
@@ -28,7 +28,14 @@ class LNbitsWallet(Wallet):
async def status(self) -> StatusResponse:
async with httpx.AsyncClient() as client:
r = await client.get(url=f"{self.endpoint}/api/v1/wallet", headers=self.key)
try:
r = await client.get(
url=f"{self.endpoint}/api/v1/wallet", headers=self.key
)
except Exception as exc:
return StatusResponse(
f"Failed to connect to {self.endpoint} due to: {exc}", 0
)
try:
data = r.json()