Make relays dynamic
This commit is contained in:
parent
a584467907
commit
c1c349a6f3
10
src/app.py
10
src/app.py
@ -65,6 +65,8 @@ def get_json():
|
||||
|
||||
nostr = {}
|
||||
nostr['names'] = {}
|
||||
nostr['relays'] = {}
|
||||
|
||||
if localusers is not None:
|
||||
for user in localusers:
|
||||
if user['nickname'] == 'gvs':
|
||||
@ -72,11 +74,7 @@ def get_json():
|
||||
for field in user.get('fields'):
|
||||
if field.get('name').lower() == 'nostr':
|
||||
nostr['names'][user['nickname']] = field.get('value')
|
||||
nostr['relays'][field.get('value')] = relays
|
||||
|
||||
|
||||
# nostr['names']['gvs'] = 'eb2881406ad19ba7cf01c210ce002f4fe53e8ce6d84e77df5a2319f9f00a8005'
|
||||
nostr['relays'] = {}
|
||||
nostr['relays']['eb2881406ad19ba7cf01c210ce002f4fe53e8ce6d84e77df5a2319f9f00a8005'] = relays
|
||||
|
||||
print(json.dumps(nostr))
|
||||
# print(json.dumps(nostr))
|
||||
return json.dumps(nostr)
|
||||
|
Loading…
Reference in New Issue
Block a user