DmitrMakeev
commited on
Commit
•
41b6a0e
1
Parent(s):
810f96b
Update app.py
Browse files
app.py
CHANGED
@@ -756,17 +756,17 @@ def send_request():
|
|
756 |
|
757 |
|
758 |
|
|
|
759 |
@app.route('/send_get_request', methods=['GET'])
|
760 |
def send_get_request():
|
761 |
token = request.args.get('token')
|
762 |
-
|
763 |
-
url = f'https://online.bizon365.ru/api/v1/webinars/reports/get?webinarId={
|
764 |
|
765 |
response = requests.get(url, headers={'X-Token': token})
|
766 |
|
767 |
if response.status_code == 200:
|
768 |
data = response.json()
|
769 |
-
# Извлекаем и декодируем поле 'report'
|
770 |
report_str = data.get('report', '{}')
|
771 |
report = json.loads(report_str)
|
772 |
return jsonify(report)
|
|
|
756 |
|
757 |
|
758 |
|
759 |
+
# Этот маршрут обрабатывает GET-запросы
|
760 |
@app.route('/send_get_request', methods=['GET'])
|
761 |
def send_get_request():
|
762 |
token = request.args.get('token')
|
763 |
+
webinarId = request.args.get('webinarId')
|
764 |
+
url = f'https://online.bizon365.ru/api/v1/webinars/reports/get?webinarId={webinarId}'
|
765 |
|
766 |
response = requests.get(url, headers={'X-Token': token})
|
767 |
|
768 |
if response.status_code == 200:
|
769 |
data = response.json()
|
|
|
770 |
report_str = data.get('report', '{}')
|
771 |
report = json.loads(report_str)
|
772 |
return jsonify(report)
|