This commit is contained in:
Tracker-Friendly 2024-02-27 17:54:40 +00:00
parent 0c0f265667
commit 007e42bf7d
2 changed files with 8 additions and 3 deletions

9
main
View File

@ -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")

View File

@ -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()