request.json -> request.get_json()

Apparently, the json method of request is considered deprecated, src https://stackoverflow.com/questions/20001229/how-to-get-posted-json-in-flask
So swallep it out for request.get_json
This commit is contained in:
ANormalPerson1
2019-03-23 09:50:40 +01:00
parent 9677273f55
commit d938937d48

View File

@@ -13,7 +13,7 @@ def load():
def deposit():
#Request .json, store json
if request.isJson():
request.json.
request.get_json()
@@ -27,4 +27,4 @@ def graph(chartID = 'chart_ID', chart_type = 'line', chart_height = 500):
return render_template('index.html', chartID=chartID, chart=chart, series=series, title=title, xAxis=xAxis, yAxis=yAxis)
if __name__ == "__main__":
app.run(debug = True, host='0.0.0.0', port=8080, passthrough_errors=True)
app.run(debug = True, host='0.0.0.0', port=8080, passthrough_errors=True)