DmitrMakeev commited on
Commit
ddea1fb
1 Parent(s): 0511987

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -214,6 +214,13 @@ def export_user():
214
 
215
 
216
 
 
 
 
 
 
 
 
217
  def send_second_request(export_id):
218
  if export_id is None:
219
  raise Exception("export_id is None")
@@ -272,9 +279,14 @@ def load_data_from_json(json_data):
272
  @app.route('/start_up', methods=['GET'])
273
  def start_up():
274
  export_id = request.args.get('export_id')
 
 
275
  if export_id is None:
276
  return json.dumps({"error": "export_id is required"}), 400
277
 
 
 
 
278
  try:
279
  json_data = send_second_request(export_id)
280
  load_data_from_json(json_data)
@@ -295,17 +307,6 @@ def start_up():
295
 
296
 
297
 
298
-
299
-
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
 
310
 
311
 
 
214
 
215
 
216
 
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
  def send_second_request(export_id):
225
  if export_id is None:
226
  raise Exception("export_id is None")
 
279
  @app.route('/start_up', methods=['GET'])
280
  def start_up():
281
  export_id = request.args.get('export_id')
282
+ api_key_sys_control = request.args.get('api_key_sys')
283
+
284
  if export_id is None:
285
  return json.dumps({"error": "export_id is required"}), 400
286
 
287
+ if api_key_sys_control != api_key_sys:
288
+ return json.dumps({"error": "Unauthorized access"}), 403
289
+
290
  try:
291
  json_data = send_second_request(export_id)
292
  load_data_from_json(json_data)
 
307
 
308
 
309
 
 
 
 
 
 
 
 
 
 
 
 
310
 
311
 
312