about summary refs log tree commit diff
path: root/src/Sessions.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Sessions.hs')
-rw-r--r--src/Sessions.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Sessions.hs b/src/Sessions.hs
index 19099fe2ef96..054495e05ca6 100644
--- a/src/Sessions.hs
+++ b/src/Sessions.hs
@@ -20,7 +20,7 @@ isValid session = do
 -- | Lookup the session by UUID.
 get :: FilePath -> T.SessionUUID -> IO (Maybe T.StoredSession)
 get dbFile uuid = withConnection dbFile $ \conn -> do
-  res <- query conn "SELECT * FROM Sessions WHERE uuid = ?" (Only uuid)
+  res <- query conn "SELECT (uuid,username,tsCreated) FROM Sessions WHERE uuid = ?" (Only uuid)
   case res of
     [x] -> pure (Just x)
     _ -> pure Nothing
@@ -28,7 +28,7 @@ get dbFile uuid = withConnection dbFile $ \conn -> do
 -- | Lookup the session stored under `username` in `dbFile`.
 find :: FilePath -> T.Username -> IO (Maybe T.StoredSession)
 find dbFile username = withConnection dbFile $ \conn -> do
-  res <- query conn "SELECT * FROM Sessions WHERE username = ?" (Only username)
+  res <- query conn "SELECT (uuid,username,tsCreated) FROM Sessions WHERE username = ?" (Only username)
   case res of
     [x] -> pure (Just x)
     _ -> pure Nothing
@@ -71,4 +71,4 @@ findOrCreate dbFile account = withConnection dbFile $ \conn ->
 -- | Return a list of all sessions in the Sessions table.
 list :: FilePath -> IO [T.StoredSession]
 list dbFile = withConnection dbFile $ \conn ->
-  query_ conn "SELECT * FROM Sessions"
+  query_ conn "SELECT (uuid,username,tsCreated) FROM Sessions"