From 2048de4f21e5db17820bf245dcdc2d779cf3a259 Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Fri, 2 Jul 2021 20:40:47 +0200 Subject: Reflect API changes in docstrings --- rwa/support/sessionservice/service.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rwa/support/sessionservice/service.py b/rwa/support/sessionservice/service.py index 95c014b..93ec919 100755 --- a/rwa/support/sessionservice/service.py +++ b/rwa/support/sessionservice/service.py @@ -126,7 +126,7 @@ class RWASupportSessionService(dbus.service.Object): :: - [{"id": , "https://example.org"}, {"id": , "http://127.0.0.1:8000"}] + [{"url": "https://example.org", "uuid": }, {"url": "http://127.0.0.1:8000", "uuid": }] """ logging.info("D-Bus method call: %s()", "get_web_app_hosts") @@ -196,7 +196,7 @@ class RWASupportSessionService(dbus.service.Object): :: - {"id": , "http://127.0.0.1:8000"} + {"status": "success", "host": {"url": "https://example.org", "uuid": }} **Structure of returned JSON (error):** @@ -255,7 +255,8 @@ class RWASupportSessionService(dbus.service.Object): logging.info('Added "%s" to "web_app_hosts" in user_settings', host_url) - response = json.dumps(self._build_host_dict(host_uuid, host_object)) + response = {"status": "success", "host": self._build_host_dict(host_uuid, host_object)} + response = json.dumps(response) logging.info('The response to D-Bus caller: "%s"', response) return response @@ -272,7 +273,7 @@ class RWASupportSessionService(dbus.service.Object): :: - [{"id": , "https://example.org"}, {"id": , "http://127.0.0.1:8000"}] + [{"url": "https://example.org", "uuid": }, {"url": "http://127.0.0.1:8000", "uuid": }] """ logging.info("D-Bus method call: %s(%s)", "remove_web_app_host", host_uuid) -- cgit v1.2.3