Przeglądaj źródła

accept both GET and POST for /

Son NK 5 lat temu
rodzic
commit
0327f755a1
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      server.py

+ 1 - 1
server.py

@@ -195,7 +195,7 @@ def register_blueprints(app: Flask):
 
 
 def set_index_page(app):
-    @app.route("/")
+    @app.route("/", methods=["GET", "POST"])
     def index():
         if current_user.is_authenticated:
             return redirect(url_for("dashboard.index"))