about summary refs log tree commit diff
path: root/src/LoginAttempts.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/LoginAttempts.hs
parent6ecab8c3a625d58fa5c4c5daf62a6567b4fc7701 (diff)
Remove erroneous parens around columns in SELECT statement
These were causing runtime errors... whoops!
Diffstat (limited to 'src/LoginAttempts.hs')
-rw-r--r--src/LoginAttempts.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/LoginAttempts.hs b/src/LoginAttempts.hs
index a7e950da7412..f5a5bde6a004 100644
--- a/src/LoginAttempts.hs
+++ b/src/LoginAttempts.hs
@@ -17,7 +17,7 @@ reset dbFile username = withConnection dbFile $ \conn ->
 -- `username`. Returns a Maybe in case `username` doesn't exist.
 forUsername :: FilePath -> T.Username -> IO (Maybe Integer)
 forUsername dbFile username = withConnection dbFile $ \conn -> do
-  res <- query conn "SELECT (numAttempts) FROM LoginAttempts WHERE username = ?"
+  res <- query conn "SELECT username,numAttempts FROM LoginAttempts WHERE username = ?"
     (Only username)
   case res of
     [T.LoginAttempt{..}] -> pure (Just loginAttemptNumAttempts)