v2 Standalone Docker Update #40

Merged
alex_orid merged 157 commits from v2.0 into master 2021-05-13 20:36:45 +00:00
Showing only changes of commit d720481c26 - Show all commits

View File

@ -10,12 +10,14 @@ def init():
#todo load entire command library and cache it here
pass
def is_command(command:str)->bool:
if command == "!echo":
return True
else:
return False
@api.route('/api/v1/exec', methods=['GET'])
def handle_command(command, rest):
if command == "!echo":
@ -23,7 +25,7 @@ def handle_command(command, rest):
return flask.make_response("{message:\"%s\"}" % message, 200, {"Content-Type": "application/json"})
@api.route('/api/v1/command', methods=['GET'])
def is_command():
def command_check():
if 'name' in request.args:
if is_command(request.args['name']):
return flask.make_response('', 200)