Re-org and start of API #47
1 changed files with 8 additions and 3 deletions
|
|
@ -210,9 +210,14 @@ class ConfServer:
|
||||||
async def handle_base(self, request):
|
async def handle_base(self, request):
|
||||||
try:
|
try:
|
||||||
# TODO - API Options here for viewing clients, tokens, restarting the server, etc.
|
# TODO - API Options here for viewing clients, tokens, restarting the server, etc.
|
||||||
text = "Bumper!"
|
#text = "Bumper!"
|
||||||
|
bots = bumper.db_get().table("bots").all()
|
||||||
return web.json_response(text)
|
clients = bumper.db_get().table("clients").all()
|
||||||
|
helperbot = self.helperbot.Client.session.transitions.state
|
||||||
|
all = {'bots':bots, 'clients':clients, 'helperbot': [{'state': helperbot}]}
|
||||||
|
|
||||||
|
|
||||||
|
return web.json_response(all)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
confserverlog.exception("{}".format(e))
|
confserverlog.exception("{}".format(e))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue