aboutsummaryrefslogtreecommitdiff
path: root/api/auth
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-02-12 18:56:52 +0100
committerlonkaars <l.leblansch@gmail.com>2021-02-12 18:56:52 +0100
commit5f391aadbcc818ab7fa13312fb2ee04ed02983c6 (patch)
tree59a50473839a26370b6d1a51cb430adb49b26536 /api/auth
parentb8f3a658253bb5991a3d034733b685cc7d543704 (diff)
base /api/game/new
Diffstat (limited to 'api/auth')
-rw-r--r--api/auth/login.py2
-rw-r--r--api/auth/signup.py2
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 )