mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08: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['session_id'] = result['session_id']
|
||||||
session['username'] = result['username']
|
session['username'] = result['username']
|
||||||
if data.get('remember'):
|
session.permanent = True if data.get('remember') else False
|
||||||
session.permanent = True
|
|
||||||
|
|
||||||
return jsonify({'status': 'ok', 'username': result['username'], 'display_name': result['display_name']})
|
return jsonify({'status': 'ok', 'username': result['username'], 'display_name': result['display_name']})
|
||||||
|
|
||||||
|
@ -422,9 +422,11 @@ class Account{
|
|||||||
this.lock(false)
|
this.lock(false)
|
||||||
reject()
|
reject()
|
||||||
})
|
})
|
||||||
|
if(!get){
|
||||||
|
request.setRequestHeader("X-CSRFToken", token)
|
||||||
|
}
|
||||||
if(obj){
|
if(obj){
|
||||||
request.setRequestHeader("Content-Type", "application/json;charset=UTF-8")
|
request.setRequestHeader("Content-Type", "application/json;charset=UTF-8")
|
||||||
request.setRequestHeader("X-CSRFToken", token)
|
|
||||||
request.send(JSON.stringify(obj))
|
request.send(JSON.stringify(obj))
|
||||||
}else{
|
}else{
|
||||||
request.send()
|
request.send()
|
||||||
|
Loading…
Reference in New Issue
Block a user