浏览代码

[Fix] 283 forceAPI authentication to get version and start by post an audio

ThiBuff 8 年之前
父节点
当前提交
f6f80011b7
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      kalliope/core/RestAPI/FlaskAPI.py

+ 2 - 0
kalliope/core/RestAPI/FlaskAPI.py

@@ -76,6 +76,7 @@ class FlaskAPI(threading.Thread):
     def run(self):
         self.app.run(host='0.0.0.0', port="%s" % int(self.port), debug=True, threaded=True, use_reloader=False)
 
+    @requires_auth
     def get_main_page(self):
         data = {
             "Kalliope version": "%s" % version_str
@@ -191,6 +192,7 @@ class FlaskAPI(threading.Thread):
             }
             return jsonify(error=data), 400
 
+    @requires_auth
     def run_synapse_by_audio(self):
         """
         Give an order to Kalliope with an audio file