From b6a66e297fb03869722f91fe681326c59e61799e Mon Sep 17 00:00:00 2001 From: nosklo Date: Tue, 11 Jul 2023 10:51:25 -0300 Subject: [PATCH] =?UTF-8?q?Permite=20usar=20vari=C3=A1vel=20de=20ambiente?= =?UTF-8?q?=20para=20definir=20o=20redirecionamento=20da=20p=C3=A1gina=20i?= =?UTF-8?q?nicial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rifaserver/app.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rifaserver/app.py b/rifaserver/app.py index ccad86a..8e0d5eb 100644 --- a/rifaserver/app.py +++ b/rifaserver/app.py @@ -102,6 +102,14 @@ def create_app(): app = create_app() +@app.route('/') +def root(): + if app.config['REDIRECT_ROOT_URL']: + return redirect(app.config['REDIRECT_ROOT_URL']) + else: + return "Nada" + + @app.route('/login', methods=['GET', 'POST']) def login(): if request.method == 'POST':