Spaces:
Sleeping
Sleeping
Commit
·
eb25ab5
1
Parent(s):
90f0188
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,13 @@ app = flask.Flask(__name__, template_folder="./")
|
|
8 |
@app.route('/')
|
9 |
def index():
|
10 |
return flask.render_template('index.html')
|
11 |
-
|
12 |
@app.route("/avp", methods=["POST"])
|
13 |
def avp():
|
14 |
incoming = request.get_json()
|
15 |
print(incoming)
|
16 |
-
#
|
|
|
|
|
17 |
response = {"bazis": incoming["bazis"]}
|
18 |
return jsonify(response)
|
19 |
if __name__ == '__main__':
|
|
|
8 |
@app.route('/')
|
9 |
def index():
|
10 |
return flask.render_template('index.html')
|
|
|
11 |
@app.route("/avp", methods=["POST"])
|
12 |
def avp():
|
13 |
incoming = request.get_json()
|
14 |
print(incoming)
|
15 |
+
# Парсинг входящего JSON файла и изменение значений ключей
|
16 |
+
for key, value in incoming.items():
|
17 |
+
incoming[key] = value - 1
|
18 |
response = {"bazis": incoming["bazis"]}
|
19 |
return jsonify(response)
|
20 |
if __name__ == '__main__':
|