Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,8 +78,7 @@ def check_password():
|
|
| 78 |
correct_password = "c900"
|
| 79 |
|
| 80 |
if password == correct_password:
|
| 81 |
-
session["authenticated"] = True
|
| 82 |
-
session.modified = True # Mark session as modified to ensure it is saved
|
| 83 |
return jsonify({"authenticated": True}), 200
|
| 84 |
else:
|
| 85 |
return jsonify({"authenticated": False}), 200
|
|
@@ -87,12 +86,11 @@ def check_password():
|
|
| 87 |
@app.route("/mainGUI", methods=["GET", "POST"])
|
| 88 |
def main_gui():
|
| 89 |
if "authenticated" not in session or not session["authenticated"]:
|
| 90 |
-
return redirect(url_for("
|
| 91 |
-
|
| 92 |
return render_template("proposed-GUI.html")
|
| 93 |
|
| 94 |
|
| 95 |
-
|
| 96 |
@app.route("/WordSearch",methods=["GET", "POST"])
|
| 97 |
def getInfo2toMeasure():
|
| 98 |
# API.AppendtablestoSheets()
|
|
@@ -100,6 +98,7 @@ def getInfo2toMeasure():
|
|
| 100 |
|
| 101 |
|
| 102 |
|
|
|
|
| 103 |
@app.route('/getprojectnames/',methods=['GET'])
|
| 104 |
def getprjnamesfromTestAPI():
|
| 105 |
progress_updates = [] # Shared list to store progress
|
|
|
|
| 78 |
correct_password = "c900"
|
| 79 |
|
| 80 |
if password == correct_password:
|
| 81 |
+
session["authenticated"] = True
|
|
|
|
| 82 |
return jsonify({"authenticated": True}), 200
|
| 83 |
else:
|
| 84 |
return jsonify({"authenticated": False}), 200
|
|
|
|
| 86 |
@app.route("/mainGUI", methods=["GET", "POST"])
|
| 87 |
def main_gui():
|
| 88 |
if "authenticated" not in session or not session["authenticated"]:
|
| 89 |
+
return redirect(url_for("password"))
|
|
|
|
| 90 |
return render_template("proposed-GUI.html")
|
| 91 |
|
| 92 |
|
| 93 |
+
|
| 94 |
@app.route("/WordSearch",methods=["GET", "POST"])
|
| 95 |
def getInfo2toMeasure():
|
| 96 |
# API.AppendtablestoSheets()
|
|
|
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
+
|
| 102 |
@app.route('/getprojectnames/',methods=['GET'])
|
| 103 |
def getprjnamesfromTestAPI():
|
| 104 |
progress_updates = [] # Shared list to store progress
|