diff options
-rwxr-xr-x | effiapi | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -186,6 +186,11 @@ class API: routes = [ { 'method': 'GET', + 'path': '/hello', + 'callback': self._call(self._show_hello), + }, + { + 'method': 'GET', 'path': '/status', 'callback': self._call(self._show_status), }, @@ -239,6 +244,9 @@ class API: return None return w[1] + def _show_hello(self): + return response(200, None, {"greeting": "hello, world\n"}) + def _show_status(self): status = self._muck.status() return response(200, None, status) |