Skip to content
Snippets Groups Projects
Commit 0801d27f authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Fix json output (add endpoints)

parent 78e0726d
Branches
No related tags found
No related merge requests found
......@@ -358,7 +358,22 @@ def meetings_twolines(config: Config, watch: int, fancy: bool, sum_:bool):
def format_json(config: Config, watch: bool, compact: bool) -> str:
meetings = [get_meetings(e.secret, e.url, config.path, sum_=False) for e in config.endpoints]
meetings = []
for e, meeting in [(e, get_meetings(e.secret, e.url, config.path, sum_=False)) for e in config.endpoints]:
# metting = [m for m in ]
if meeting == ["unreachable"]:
meeting = [{"unreachable" : "true"}]
else:
meeting[0]["unreachable"] = "false"
for m in meeting:
m["endpoint"] = e.name
meetings.append(meeting)
# Clear screen after request is done, and before printing new data to keep
# blinking to a minimum
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment