Add schedule command

No action executed. This command only return a 200 OK message.
more_events
Alvaro Neira Ayuso 2020-01-02 20:47:17 +01:00 committed by Alvaro Neira Ayuso
parent 261a5edf7c
commit 9fd8f2dbd0
1 changed files with 5 additions and 0 deletions

View File

@ -88,6 +88,8 @@ class ogRest():
self.process_shellout(client)
elif ("hardware" in URI):
self.process_hardware(client)
elif ("run/schedule" in URI):
self.process_schedule(client)
else:
client.send(self.getResponse(ogResponses.BAD_REQUEST))
elif ("POST" in op):
@ -157,3 +159,6 @@ class ogRest():
path = '/tmp/Chrd-' + client.ip
threading.Thread(target=ogThread.prochardware, args=(self.msgqueue, path,)).start()
client.send(self.getResponse(ogResponses.OK))
def process_schedule(self, client):
client.send(self.getResponse(ogResponses.OK))