DmitrMakeev commited on
Commit
90f0188
·
1 Parent(s): 7b4beb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -8,13 +8,13 @@ app = flask.Flask(__name__, template_folder="./")
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
- # Изменение значений ключей на единицу меньше
16
- modified_data = {key: int(value) - 1 for key, value in incoming.items()}
17
- response = {"bazis": modified_data}
18
  return jsonify(response)
19
  if __name__ == '__main__':
20
- app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))
 
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
+ # Обработка POST запроса по пути "/avp"
17
+ response = {"bazis": incoming["bazis"]}
 
18
  return jsonify(response)
19
  if __name__ == '__main__':
20
+ app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))