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:
parent
abf6705f6f
commit
ac8addfe9e
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue