From 7e91c6a59858325593093c046c213c6bd4e7e4f3 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 6 Aug 2018 09:10:42 +0200 Subject: Some GUI changes --- gui/api/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gui/api/__init__.py') diff --git a/gui/api/__init__.py b/gui/api/__init__.py index 959dedc..6c04a64 100755 --- a/gui/api/__init__.py +++ b/gui/api/__init__.py @@ -71,3 +71,8 @@ class API: cherrypy.response.headers["Content-Type"] = "text/plain" cherrypy.response.status = 400 return "POST only" + + @cherrypy.expose + def dpd_status(self, **kwargs): + cherrypy.response.headers["Content-Type"] = "application/json" + return json.dumps(self.dpd.status()).encode() -- cgit v1.2.3