|
|
|
@ -549,13 +549,20 @@ class Bureau(object):
|
|
|
|
|
continue
|
|
|
|
|
self.log.debug("got method: " + ref)
|
|
|
|
|
|
|
|
|
|
if (ref in self.commands) or (ref in self.api):
|
|
|
|
|
if (ref in self.commands) or (ref in self.api) or
|
|
|
|
|
(ref in self.webviews):
|
|
|
|
|
if ref in self.api:
|
|
|
|
|
if data:
|
|
|
|
|
data = json.loads(data)
|
|
|
|
|
ret = json.dumps(self.api[ref](data))
|
|
|
|
|
else:
|
|
|
|
|
ret = json.dumps(self.api[ref]())
|
|
|
|
|
elif ref in self.webviews:
|
|
|
|
|
if data:
|
|
|
|
|
data = json.loads(data)
|
|
|
|
|
ret = json.dumps(self.webviews[ref](data))
|
|
|
|
|
else:
|
|
|
|
|
ret = json.dumps(self.webviews[ref]())
|
|
|
|
|
else:
|
|
|
|
|
if data:
|
|
|
|
|
ret = self.commands[ref](data)
|
|
|
|
|