mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2025-12-06 06:21:36 +01:00
This commit is contained in:
@@ -187,10 +187,11 @@ def downtime():
|
||||
elif flask.request.method == "GET":
|
||||
dt = app.config["DOWNTIME"]
|
||||
if dt < datetime.datetime.now():
|
||||
return ("No Downtime set at the moment", 200)
|
||||
return flask.jsonify({"title" : "No Downtime set at the moment", "message" : ""})
|
||||
else:
|
||||
delta = int((dt - datetime.datetime.now()).total_seconds()/60)
|
||||
return ("Downtime set for {}m until {}".format(delta, dt.isoformat()))
|
||||
return flask.jsonify({"title" : "Downtime set for {}m until {}".format(delta, dt.isoformat()),
|
||||
"message" : ""})
|
||||
|
||||
|
||||
@app.route('/settings', methods=["GET", "POST"])
|
||||
|
||||
Reference in New Issue
Block a user