DmitrMakeev
commited on
Commit
•
aed6774
1
Parent(s):
28bdcf3
Update app.py
Browse files
app.py
CHANGED
@@ -890,11 +890,13 @@ def send_request():
|
|
890 |
|
891 |
if response.status_code == 200:
|
892 |
data = response.json()
|
|
|
893 |
return jsonify(data)
|
894 |
else:
|
895 |
return jsonify({'error': 'Failed to fetch data from the API'}), response.status_code
|
896 |
|
897 |
|
|
|
898 |
@app.route('/send_get_request', methods=['GET'])
|
899 |
def send_get_request():
|
900 |
token = request.args.get('token')
|
|
|
890 |
|
891 |
if response.status_code == 200:
|
892 |
data = response.json()
|
893 |
+
# Убедитесь, что data - это массив или объект с массивом
|
894 |
return jsonify(data)
|
895 |
else:
|
896 |
return jsonify({'error': 'Failed to fetch data from the API'}), response.status_code
|
897 |
|
898 |
|
899 |
+
|
900 |
@app.route('/send_get_request', methods=['GET'])
|
901 |
def send_get_request():
|
902 |
token = request.args.get('token')
|