0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-03-16 22:33:29 +00:00

More explicit about using email as username

This commit is contained in:
Nick Satterly 2017-10-06 21:05:36 +01:00
parent abf6705f6f
commit ac8addfe9e

View file

@ -21,7 +21,7 @@ def signup():
except Exception as e:
raise ApiError(str(e), 400)
if User.get_by_email(user.email):
if User.get_by_email(email=user.email):
raise ApiError("username already exists", 409)
try:
@ -64,7 +64,7 @@ def login():
except KeyError:
raise ApiError("must supply 'username' and 'password'", 401)
user = User.get_by_email(username)
user = User.get_by_email(email=username)
if not user:
raise ApiError("invalid username or password", 401)