feat: public relay page updates

This commit is contained in:
Vlad Stan 2023-02-10 14:47:48 +02:00
parent ae68f210cd
commit db3ad2e32f
4 changed files with 102 additions and 20 deletions

View file

@ -2,7 +2,7 @@ import json
from typing import Any, List, Optional, Tuple
from . import db
from .models import NostrEvent, NostrFilter, NostrRelay, RelaySpec
from .models import NostrEvent, NostrFilter, NostrRelay, RelayPublicSpec, RelaySpec
########################## RELAYS ####################
@ -100,6 +100,7 @@ async def get_public_relay(relay_id: str) -> Optional[dict]:
"description": relay.description,
"pubkey": relay.pubkey,
"contact": relay.contact,
"config": dict(RelayPublicSpec(**dict(relay.config)))
}