add new endpoints for app v2 #116

Merged
edenhaus merged 17 commits from ecovacs-home into master 2021-06-05 15:06:19 +02:00
Showing only changes of commit c5dfad41fa - Show all commits

View file

@ -237,7 +237,7 @@ class ConfServer:
else: else:
postbody = await request.post() postbody = await request.post()
to_log["request"]["body"] = postbody to_log["request"]["body"] = f"{postbody}"
response = await handler(request) response = await handler(request)
if response is None: if response is None:
@ -249,7 +249,7 @@ class ConfServer:
"status": f"{response.status}", "status": f"{response.status}",
} }
if not "application/octet-stream" in response.content_type: if not "application/octet-stream" in response.content_type:
to_log["response"]["status"] = f"{response.status}" to_log["response"]["body"] = f"{json.loads(response.body)}"
confserverlog.debug(json.dumps(to_log)) confserverlog.debug(json.dumps(to_log))