xarical commited on
Commit
894e5af
·
verified ·
1 Parent(s): 4361cbe

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +12 -10
api.py CHANGED
@@ -1,11 +1,13 @@
1
- from flask import Flask, Response, json, jsonify, request
2
-
3
-
4
- api = Flask(__name__)
5
-
6
- @api.route("/", methods=["POST"])
7
- def query() -> Response:
8
- data = json.loads(request.data)
9
- return jsonify({"dummy": "response"}.update(data))
10
-
 
 
11
  api.run(host="localhost", port=3000)
 
1
+ from flask import Flask, Response, json, jsonify, request
2
+
3
+
4
+ api = Flask(__name__)
5
+
6
+ @api.route("/", methods=["POST"])
7
+ def query() -> Response:
8
+ data = json.loads(request.data)
9
+ response_data = {"dummy": "response"}
10
+ response_data.update(data)
11
+ return jsonify(response_data)
12
+
13
  api.run(host="localhost", port=3000)