DmitrMakeev
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -584,7 +584,9 @@ def send_request():
|
|
584 |
response = requests.get(url, headers={'X-Token': token})
|
585 |
|
586 |
if response.status_code == 200:
|
587 |
-
|
|
|
|
|
588 |
else:
|
589 |
return jsonify({'error': 'Failed to fetch data from the API'}), response.status_code
|
590 |
|
@@ -602,12 +604,6 @@ def send_request():
|
|
602 |
|
603 |
|
604 |
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
|
612 |
|
613 |
|
|
|
584 |
response = requests.get(url, headers={'X-Token': token})
|
585 |
|
586 |
if response.status_code == 200:
|
587 |
+
data = response.json()
|
588 |
+
webinar_ids = [item['webinarId'] for item in data['list']]
|
589 |
+
return jsonify(webinar_ids)
|
590 |
else:
|
591 |
return jsonify({'error': 'Failed to fetch data from the API'}), response.status_code
|
592 |
|
|
|
604 |
|
605 |
|
606 |
|
|
|
|
|
|
|
|
|
|
|
|
|
607 |
|
608 |
|
609 |
|