DmitrMakeev
commited on
Commit
•
c7511da
1
Parent(s):
89fe525
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,11 @@ import flask
|
|
2 |
from flask import request, jsonify
|
3 |
import os
|
4 |
from dotenv import load_dotenv
|
|
|
|
|
|
|
|
|
|
|
5 |
load_dotenv()
|
6 |
|
7 |
app = flask.Flask(__name__, template_folder="./")
|
@@ -24,22 +29,28 @@ def zapro():
|
|
24 |
return flask.render_template('zapro.html')
|
25 |
|
26 |
|
|
|
|
|
|
|
|
|
27 |
@app.route("/api", methods=['GET'])
|
28 |
-
def
|
29 |
-
|
30 |
-
ph = request.args.get('ph')
|
31 |
-
|
32 |
-
# Читаем значение параметра "test2" из GET-запроса
|
33 |
-
ec = request.args.get('ec')
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
@app.route("/avp", methods=["POST"])
|
45 |
def avp():
|
|
|
2 |
from flask import request, jsonify
|
3 |
import os
|
4 |
from dotenv import load_dotenv
|
5 |
+
|
6 |
+
|
7 |
+
from api_logic import api
|
8 |
+
|
9 |
+
|
10 |
load_dotenv()
|
11 |
|
12 |
app = flask.Flask(__name__, template_folder="./")
|
|
|
29 |
return flask.render_template('zapro.html')
|
30 |
|
31 |
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
@app.route("/api", methods=['GET'])
|
37 |
+
def handle_api():
|
38 |
+
response = api()
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
return response
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
|
55 |
@app.route("/avp", methods=["POST"])
|
56 |
def avp():
|