Explorar o código

Merge pull request #284 from kalliope-project/fix/283_api_authentication

[Fix] #283 forceAPI  authentication to get version and start by post a…
Nicolas Marcq %!s(int64=8) %!d(string=hai) anos
pai
achega
3a009f9775
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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):
     def run(self):
         self.app.run(host='0.0.0.0', port="%s" % int(self.port), debug=True, threaded=True, use_reloader=False)
         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):
     def get_main_page(self):
         data = {
         data = {
             "Kalliope version": "%s" % version_str
             "Kalliope version": "%s" % version_str
@@ -191,6 +192,7 @@ class FlaskAPI(threading.Thread):
             }
             }
             return jsonify(error=data), 400
             return jsonify(error=data), 400
 
 
+    @requires_auth
     def run_synapse_by_audio(self):
     def run_synapse_by_audio(self):
         """
         """
         Give an order to Kalliope with an audio file
         Give an order to Kalliope with an audio file