diff --git a/app.py b/app.py index de665b2..c83283e 100644 --- a/app.py +++ b/app.py @@ -106,14 +106,12 @@ def createAccount(): username = request.form['username'].lower() if(db.users.find_one({'username': username})): - #TODO - pass + return render_template("create-account.html", username_exists=True) password = request.form['password'] if(password != request.form['password-confirm']): - #TODO - pass + return render_template("create-account.html", password_mismatch=True) salt = os.urandom(32) diff --git a/templates/create-account.html b/templates/create-account.html index 59aa55d..b72de85 100644 --- a/templates/create-account.html +++ b/templates/create-account.html @@ -64,6 +64,13 @@

Create an Account

+ {% if password_mismatch == True %} +

Passwords do not match

+ {% endif %} + {% if username_exists == True %} +

Username already exists

+ {% endif %} +