From 74cd6b8f5677ecefa63e0d314baf1c284801a3ea Mon Sep 17 00:00:00 2001 From: Pablo Ferreiro Date: Sun, 6 Mar 2022 19:25:20 +0100 Subject: [PATCH] Fixed response --- cli.py | 6 ++++-- web.py | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cli.py b/cli.py index 93bcb76..8b8a28c 100644 --- a/cli.py +++ b/cli.py @@ -9,8 +9,10 @@ if __name__ == '__main__': nav = signer.navigator() res = { 'status': 'ok', - 'data': data, - 'navigator': nav + 'data': { + **data, + 'navigator': nav + } } print(json.dumps(res)) signer.cleanup() diff --git a/web.py b/web.py index 4aa629e..87ada31 100644 --- a/web.py +++ b/web.py @@ -16,10 +16,12 @@ class TikServer(BaseHTTPRequestHandler): res = { 'status': 'ok', - 'data': data, - 'navigator': nav + 'data': { + **data, + 'navigator': nav + } } - + self.send_response(200) self.send_header('Content-type', 'application/json') self.end_headers()