From 007e42bf7d59f462fa31e15484f3da562c03d3f6 Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Tue, 27 Feb 2024 17:54:40 +0000 Subject: [PATCH] FIXED * --- main | 9 +++++++-- static/js/main.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/main b/main index db096f5..a719db8 100644 --- a/main +++ b/main @@ -97,25 +97,29 @@ def check_username_taken(username): return post["id"] # Main page +@app.route("/index.html") @app.route("/") async def main(): return await render_template("main.html") # Web app +@app.route("/app/index.html") @app.route("/app") async def webapp(): return await render_template("app.html") # Login and signup +@app.route("/signup/index.html") @app.route("/signup") async def signup(): return await render_template("signup.html") -@app.route("/login") +@app.route("/login/index.html") async def login(): return await render_template("login.html") # Privacy policy +@app.route("/privacy/index.html") @app.route("/privacy") async def privacy(): return await render_template("privacy.html") @@ -500,7 +504,8 @@ def listusers(secretkey): else: return redirect("/") -@app.route("/api/logout") +@app.route("/logout/index.html") +@app.route("/logout") async def apilogout(): return await render_template("logout.html") diff --git a/static/js/main.js b/static/js/main.js index 81cfe62..268d7a0 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -211,7 +211,7 @@ function updateUserInfo() { closeErrorButton.classList.add("hidden") usernameBox.innerText = "" setTimeout(function () { - window.location.replace("https://notes.hectabit.org/api/logout") + window.location.replace("../logout/index.html") }, 2500); } else { let responseData = await response.json()