فهرست منبع

[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