make it cuter

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

View file

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