master updates #41

Manually merged
alex_orid merged 177 commits from master into github-master 2021-05-13 21:11:10 +00:00
Showing only changes of commit c590443de3 - Show all commits

View File

@ -22,7 +22,7 @@ def handle_command(command, rest):
if command == "!echo":
message = "Got payload [%s]" % rest
print(message)
return flask.make_response("{message:\"%s\"}" % message, 200, {"Content-Type": "application/json"})
return flask.make_response("{\"message\":\"%s\"}" % message, 200, {"Content-Type": "application/json"})
@api.route('/api/v1/command', methods=['GET'])
@ -37,9 +37,9 @@ def command_check():
@api.route('/api/v1/exec', methods=['GET'])
def exec_command():
if 'command_name' not in request.args:
return flask.make_response('{text:"Argument \'command_name\' not in request"}', 400)
return flask.make_response('{\"text\":"Argument \'command_name\' not in request"}', 400)
if 'rest' not in request.args:
return flask.make_response('{text:"Argument \'rest\' not in request"}', 400)
return flask.make_response('{\"text\":"Argument \'rest\' not in request"}', 400)
return handle_command(request.args['command_name'], request.args['rest'])