chore: code format

This commit is contained in:
Vlad Stan 2023-03-17 15:06:09 +02:00
parent 30ffcf7f55
commit 3aa4875558
3 changed files with 10 additions and 10 deletions

View file

@ -24,14 +24,13 @@ nostrrelay_redirect_paths = [
{
"from_path": "/",
"redirect_to_path": "/api/v1/relay-info",
"header_filters": {
"accept": "application/nostr+json"
}
"header_filters": {"accept": "application/nostr+json"},
}
]
scheduled_tasks: List[asyncio.Task] = []
def nostrrelay_renderer():
return template_renderer(["lnbits/extensions/nostrrelay/templates"])

View file

@ -121,7 +121,7 @@ async def api_toggle_relay(
) -> NostrRelay:
try:
relay = await get_relay(wallet.wallet.user,relay_id)
relay = await get_relay(wallet.wallet.user, relay_id)
if not relay:
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND,
@ -159,12 +159,13 @@ async def api_get_relays(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
detail="Cannot fetch relays",
)
@nostrrelay_ext.get("/api/v1/relay-info")
async def api_get_relay_info() -> JSONResponse:
return relay_info_response(NostrRelay.info())
@nostrrelay_ext.get("/api/v1/relay/{relay_id}")
async def api_get_relay(
relay_id: str, wallet: WalletTypeInfo = Depends(require_invoice_key)