mirror of
https://github.com/yuukiwww/taiko-web.git
synced 2024-10-22 17:05:49 +02:00
Fix logging out and the Remember me checkbox
This commit is contained in:
parent
a62184e0d2
commit
54a98b77d9
3
app.py
3
app.py
@ -397,8 +397,7 @@ def route_api_login():
|
||||
|
||||
session['session_id'] = result['session_id']
|
||||
session['username'] = result['username']
|
||||
if data.get('remember'):
|
||||
session.permanent = True
|
||||
session.permanent = True if data.get('remember') else False
|
||||
|
||||
return jsonify({'status': 'ok', 'username': result['username'], 'display_name': result['display_name']})
|
||||
|
||||
|
@ -422,9 +422,11 @@ class Account{
|
||||
this.lock(false)
|
||||
reject()
|
||||
})
|
||||
if(!get){
|
||||
request.setRequestHeader("X-CSRFToken", token)
|
||||
}
|
||||
if(obj){
|
||||
request.setRequestHeader("Content-Type", "application/json;charset=UTF-8")
|
||||
request.setRequestHeader("X-CSRFToken", token)
|
||||
request.send(JSON.stringify(obj))
|
||||
}else{
|
||||
request.send()
|
||||
|
Loading…
Reference in New Issue
Block a user