diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-07-02 20:40:47 +0200 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-07-02 20:40:47 +0200 |
commit | 2048de4f21e5db17820bf245dcdc2d779cf3a259 (patch) | |
tree | e33fbb2671886ec01837c2995001a4c5ba32430e | |
parent | 2a354a70597dbbe23b203aa7f2693a9388b086d1 (diff) | |
download | RWA.Support.SessionService-2048de4f21e5db17820bf245dcdc2d779cf3a259.tar.gz RWA.Support.SessionService-2048de4f21e5db17820bf245dcdc2d779cf3a259.tar.bz2 RWA.Support.SessionService-2048de4f21e5db17820bf245dcdc2d779cf3a259.zip |
Reflect API changes in docstrings
-rwxr-xr-x | rwa/support/sessionservice/service.py | 9 |
1 files 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": <host_uuid>, "https://example.org"}, {"id": <host_uuid>, "http://127.0.0.1:8000"}] + [{"url": "https://example.org", "uuid": <host_uuid>}, {"url": "http://127.0.0.1:8000", "uuid": <host_uuid>}] """ logging.info("D-Bus method call: %s()", "get_web_app_hosts") @@ -196,7 +196,7 @@ class RWASupportSessionService(dbus.service.Object): :: - {"id": <host_uuid>, "http://127.0.0.1:8000"} + {"status": "success", "host": {"url": "https://example.org", "uuid": <host_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": <host_uuid>, "https://example.org"}, {"id": <host_uuid>, "http://127.0.0.1:8000"}] + [{"url": "https://example.org", "uuid": <host_uuid>}, {"url": "http://127.0.0.1:8000", "uuid": <host_uuid>}] """ logging.info("D-Bus method call: %s(%s)", "remove_web_app_host", host_uuid) |