diff options
Diffstat (limited to 'api/auth')
-rw-r--r-- | api/auth/login.py | 2 | ||||
-rw-r--r-- | api/auth/signup.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/api/auth/login.py b/api/auth/login.py index 8eb0eea..e686b67 100644 --- a/api/auth/login.py +++ b/api/auth/login.py @@ -15,7 +15,7 @@ def index(): if not email or \ not password: return "", 400 - + user_id = None user_id = user_id or cursor.execute("select user_id from users where email = ?", [email]).fetchone() user_id = user_id or cursor.execute("select user_id from users where username = ?", [email]).fetchone() diff --git a/api/auth/signup.py b/api/auth/signup.py index a9e155c..e77f82d 100644 --- a/api/auth/signup.py +++ b/api/auth/signup.py @@ -26,7 +26,7 @@ def index(): if cursor.execute("select email from users where email = ?", [email]).fetchone(): return {"error": "email_taken"}, 403 - user_id = new_uuid() + user_id = new_uuid("users") password_hash = passwords.password_hash(password) registered = int( time.time() * 1000 ) |