sort sessions by last_used

This commit is contained in:
iou1name 2019-09-26 19:26:29 -04:00
parent 06cf8161e9
commit 74cd0713ec

View File

@ -45,7 +45,7 @@ async def index(request):
request['session']['id'])
active_sessions = await conn.fetch(
"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'])
if request['session']['admin']: