tiny note about caps sensitivity in registerAccount

This commit is contained in:
Jill 2022-12-31 05:16:46 +03:00
parent 7bfb73f636
commit f6b757e5c3
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ CrystalGauntlet.endpoints["/accounts/registerGJAccount.php"] = ->(body : String)
password = params["password"]
email = params["email"]
# caps checks aren't required because `username` is already COLLATE NOCASE in the db
username_exists = DATABASE.scalar "select count(*) from accounts where username = ?", username
if username_exists != 0
return "-2"