From c4e3f3670f74f1c9e529befdf571239d292bea2e Mon Sep 17 00:00:00 2001 From: yjouanique Date: Fri, 7 Jun 2019 12:15:31 +0700 Subject: [PATCH] Added public /reconnect endpoint --- cps/web.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cps/web.py b/cps/web.py index 3fc27807..c90fba56 100644 --- a/cps/web.py +++ b/cps/web.py @@ -1884,6 +1884,12 @@ def shutdown(): return json.dumps({}) abort(404) +@app.route("/reconnect") +def reconnect(): + db.session.close() + db.engine.dispose() + db.setup_db() + return json.dumps({}) @app.route("/search", methods=["GET"]) @login_required_if_no_ano