From 8ebc89b44b3fc0e6025b33a3e7ec37e9ebb385cc Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 30 Jul 2020 19:52:04 +0100 Subject: Remove erroneous parens around columns in SELECT statement These were causing runtime errors... whoops! --- src/LoginAttempts.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/LoginAttempts.hs') 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) -- cgit 1.4.1