make it cuter

This commit is contained in:
Nyx 2025-03-13 00:20:56 -05:00
parent 8c270bd24b
commit 8577b2fcbc

View file

@ -57,13 +57,13 @@ def login():
password = encrypt(request.form['password'])
user = db.execute(text("SELECT * FROM users WHERE username = :username AND password = :password"),
{"username": username, "password": password}).fetchone()
{"username": username, "password": password}).fetchone()
if user:
session['user_id'] = user.id
return redirect('/')
else:
return "Invalid credentials!"
return "invalid credentials 😾"
return render_template('login.j2', instanceLocation=instanceLocation, instanceBranding=instanceBranding)
@app.route('/auth/register/', methods=['GET', 'POST'])
@ -77,7 +77,7 @@ def register():
existing_user = db.execute(text("SELECT * FROM users WHERE username = :username"),
{"username": username}).fetchone()
if existing_user:
return "User already exists!"
return "that user already exists 😾"
# insert new user
db.execute(text("INSERT INTO users (username, password) VALUES (:username, :password)"),