Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions auth/auth/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ def login():
pwd = unicode(pwd)
except :
return jsonify({ }) , 401
if not username :
if not username:
return jsonify({}) , 401
user = User.query.filter_by(username=username).first()
if not user:
return jsonify({}), 401
try:
user = User.query.filter_by(email=username).first()
except:
return jsonify({}), 401
if not user.verify_password(pwd):
return jsonify({}), 400

Expand Down