From 74cd0713ec6a226ad2e46d003b7cf777a518b24b Mon Sep 17 00:00:00 2001 From: iou1name Date: Thu, 26 Sep 2019 19:26:29 -0400 Subject: [PATCH] sort sessions by last_used --- buckler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buckler.py b/buckler.py index 02892dc..e31f67c 100644 --- a/buckler.py +++ b/buckler.py @@ -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']: