DmitrMakeev commited on
Commit
afce8ea
·
verified ·
1 Parent(s): ae8023d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -227,6 +227,8 @@ def get_settings():
227
  if client_api_key_sys != api_key_sys:
228
  return jsonify({"error": "Unauthorized access"}), 403
229
 
 
 
230
  return jsonify(settings)
231
 
232
  @app.route('/save_settings', methods=['POST'])
@@ -234,7 +236,7 @@ def save_settings_route():
234
  # Получаем ключ авторизации из запроса
235
  client_api_key_sys = request.json.get('api_key_sys')
236
 
237
- # Проверка ключа авторизации
238
  if client_api_key_sys != api_key_sys:
239
  return jsonify({"error": "Unauthorized access"}), 403
240
 
 
227
  if client_api_key_sys != api_key_sys:
228
  return jsonify({"error": "Unauthorized access"}), 403
229
 
230
+ # Загружаем настройки из базы данных
231
+ settings = load_settings()
232
  return jsonify(settings)
233
 
234
  @app.route('/save_settings', methods=['POST'])
 
236
  # Получаем ключ авторизации из запроса
237
  client_api_key_sys = request.json.get('api_key_sys')
238
 
239
+ # Проверка ключа авторизации
240
  if client_api_key_sys != api_key_sys:
241
  return jsonify({"error": "Unauthorized access"}), 403
242