Don't explicitly say the username is in use

This commit is contained in:
Parker M. 2024-09-20 18:07:03 -05:00
parent f7d383aa7b
commit 1acb17b3af
No known key found for this signature in database
GPG Key ID: 95CD2E0C7E329F2A

View File

@ -82,7 +82,7 @@ def signup():
user = db.query(User).filter(User.username == username).first() user = db.query(User).filter(User.username == username).first()
if user: if user:
db.close() db.close()
return {"status": "User already exists"} return {"status": "Username not available"}
# Add information to the database # Add information to the database
hashed_password = bcrypt.hashpw( hashed_password = bcrypt.hashpw(
password.encode("utf-8"), bcrypt.gensalt() password.encode("utf-8"), bcrypt.gensalt()