sort sessions by last_used
This commit is contained in:
parent
06cf8161e9
commit
74cd0713ec
|
@ -45,7 +45,7 @@ async def index(request):
|
||||||
request['session']['id'])
|
request['session']['id'])
|
||||||
active_sessions = await conn.fetch(
|
active_sessions = await conn.fetch(
|
||||||
"SELECT id, ip_address, date_created, last_used FROM user_session "
|
"SELECT id, ip_address, date_created, last_used FROM user_session "
|
||||||
"WHERE user_id = $1",
|
"WHERE user_id = $1 ORDER BY last_used DESC",
|
||||||
request['session']['id'])
|
request['session']['id'])
|
||||||
|
|
||||||
if request['session']['admin']:
|
if request['session']['admin']:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user