about summary refs log tree commit diff
path: root/src/Accounts.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/Accounts.hs
parent6ecab8c3a625d58fa5c4c5daf62a6567b4fc7701 (diff)
Remove erroneous parens around columns in SELECT statement
These were causing runtime errors... whoops!
Diffstat (limited to 'src/Accounts.hs')
-rw-r--r--src/Accounts.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Accounts.hs b/src/Accounts.hs
index e8865baa99f6..c7ab7a2f135f 100644
--- a/src/Accounts.hs
+++ b/src/Accounts.hs
@@ -37,7 +37,7 @@ delete dbFile username = withConnection dbFile $ \conn -> do
 -- | Attempt to find `username` in the Account table of `dbFile`.
 lookup :: FilePath -> T.Username -> IO (Maybe T.Account)
 lookup dbFile username = withConnection dbFile $ \conn -> do
-  res <- query conn "SELECT (username,password,email,role,profilePicture) FROM Accounts WHERE username = ?" (Only username)
+  res <- query conn "SELECT username,password,email,role,profilePicture FROM Accounts WHERE username = ?" (Only username)
   case res of
     [x] -> pure (Just x)
     _ -> pure Nothing
@@ -45,5 +45,5 @@ lookup dbFile username = withConnection dbFile $ \conn -> do
 -- | Return a list of accounts with the sensitive data removed.
 list :: FilePath -> IO [T.User]
 list dbFile = withConnection dbFile $ \conn -> do
-  accounts <- query_ conn "SELECT (username,password,email,role,profilePicture) FROM Accounts"
+  accounts <- query_ conn "SELECT username,password,email,role,profilePicture FROM Accounts"
   pure $ T.userFromAccount <$> accounts