Changing login mechanism
This commit is contained in:
parent
09a809192a
commit
0b7711fe26
1 changed files with 3 additions and 2 deletions
|
|
@ -79,9 +79,10 @@ def uploads(id, type='jpg'):
|
|||
def send_access_token():
|
||||
try:
|
||||
try:
|
||||
data = request.json
|
||||
user = User.get(
|
||||
(User.username == request.form['username']) &
|
||||
(User.password == pwdhash(request.form['password'])))
|
||||
(User.username == data['username']) &
|
||||
(User.password == pwdhash(data['password'])))
|
||||
except User.DoesNotExist:
|
||||
return jsonify({
|
||||
'message': 'Invalid username or password',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue