Add new API endpoint /record as a (preferred) alias for /report

This commit is contained in:
Peter J. Holzer 2023-01-07 12:55:21 +01:00 committed by Peter J. Holzer
parent ca0ce798da
commit a83ebfcc99
1 changed files with 4 additions and 0 deletions

4
app.py
View File

@ -25,6 +25,10 @@ def home():
@app.route("/report", methods=["POST"]) @app.route("/report", methods=["POST"])
def report(): def report():
return record()
@app.route("/record", methods=["POST"])
def record():
data = request.get_json() data = request.get_json()
n_ts = 0 n_ts = 0
n_dp = 0 n_dp = 0