machine: Update API registration

Signed-off- by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2020-09-03 07:26:16 -04:00
parent 34008569dd
commit 33b965644b
1 changed files with 2 additions and 4 deletions

View File

@ -9,11 +9,9 @@ class Machine:
def __init__(self, config):
self.server = config.get_server()
self.server.register_endpoint(
"/machine/reboot", "machine_reboot", ['POST'],
self._handle_machine_request)
"/machine/reboot", ['POST'], self._handle_machine_request)
self.server.register_endpoint(
"/machine/shutdown", "machine_shutdown", ['POST'],
self._handle_machine_request)
"/machine/shutdown", ['POST'], self._handle_machine_request)
async def _handle_machine_request(self, path, method, args):
if path == "/machine/shutdown":