From 5f391aadbcc818ab7fa13312fb2ee04ed02983c6 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 12 Feb 2021 18:56:52 +0100 Subject: base /api/game/new --- api/auth/login.py | 2 +- api/auth/signup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'api/auth') 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 ) -- cgit v1.2.3