about summary refs log tree commit diff
path: root/src/Sessions.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-30T18·52+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-30T18·52+0100
commit8ebc89b44b3fc0e6025b33a3e7ec37e9ebb385cc (patch)
tree07b7cd08675ff19f371d5ce078c1c6f916fb80b1 /src/Sessions.hs
parent6ecab8c3a625d58fa5c4c5daf62a6567b4fc7701 (diff)
Remove erroneous parens around columns in SELECT statement
These were causing runtime errors... whoops!
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 054495e05ca6..f5b2f6f41000 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 (uuid,username,tsCreated) 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 (uuid,username,tsCreated) 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 (uuid,username,tsCreated) FROM Sessions"
+  query_ conn "SELECT uuid,username,tsCreated FROM Sessions"