aboutsummaryrefslogtreecommitdiff
path: root/api/auth/signup.py
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-16 17:01:16 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-16 17:01:16 +0200
commit2e58a8597aa14b43835dcc162fc661e21c5c8fe2 (patch)
treeced66324e723525fb342d44c55c1f26fdc9fd630 /api/auth/signup.py
parent07c2b124e4348b15f1e5ec18c6cdfd77248c6bc8 (diff)
fix ugly horizontal alignment by dprint
Diffstat (limited to 'api/auth/signup.py')
-rw-r--r--api/auth/signup.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/api/auth/signup.py b/api/auth/signup.py
index a18796b..bf1208d 100644
--- a/api/auth/signup.py
+++ b/api/auth/signup.py
@@ -15,8 +15,7 @@ def validate_username(username):
# garbage email validation (see todo)
def validate_email(email):
#TODO: use node_modules/email-validator/index.js
- return len(email) > 1 and \
- "@" in email
+ return len(email) > 1 and "@" in email
# checks if the password is safe (regex explanation in pages/register.tsx)
@@ -40,14 +39,14 @@ def index():
# return 400 (malformed request) if any of the required data is missing
if not username or \
- not email or \
- not password:
+ not email or \
+ not password:
return "", 400
# return 403 (forbidden) if any of the required data is invalid
if not validate_username(username) or \
- not validate_email(email) or \
- not validate_password(password):
+ not validate_email(email) or \
+ not validate_password(password):
return {"error": "form_data_invalid"}, 403
# check if username is taken