Updated flash commands to allow for differently styled boxes

This commit is contained in:
2024-01-27 22:08:15 +00:00
parent ce316eb9fd
commit 595069772c
3 changed files with 18 additions and 15 deletions

View File

@@ -31,13 +31,13 @@ def login():
# No user found
if user is None:
error = "No user found with the username " + request.form['username']
flash(error)
flash(error, 'warning')
return redirect("/login")
# Incorrect Password
if sha512(request.form['password'].encode()).hexdigest() != user.password:
error = "Incorrect Password"
flash(error)
flash(error, 'warning')
return redirect("/login")
session['user_id'] = user.id
@@ -59,7 +59,7 @@ def signup():
# User already exists
if database.read(request.form['username']) is not None:
error = "User, " + request.form['username'] + " already exists"
flash(error)
flash(error, 'warning')
return redirect("/signup")
# Signup as Seller or Customer