From 9e485265af0972e457d0b0bbad01958896b40406 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 25 Aug 2023 16:32:50 +1000 Subject: [PATCH] main: Added the post method --- master/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/master/main.py b/master/main.py index 4755bf0..40697a1 100644 --- a/master/main.py +++ b/master/main.py @@ -447,10 +447,10 @@ def home(): return html # Admin page -@app.route('/admin',) +@app.route('/admin', methods=['GET', 'POST']) def admin(): # Check if logged in - loggin_key = request.cookies.get('login_key') + login_key = request.cookies.get('login_key') if request.method == 'POST': # Handle login @@ -465,9 +465,9 @@ def admin(): return resp - if loggin_key == None: + if login_key == None: return "

Admin


" - if loggin_key not in loggins: + if login_key not in loggins: return "

Admin


" return "

Admin


Logged in"