Remove erroneous parens around columns in SELECT statement

These were causing runtime errors... whoops!
This commit is contained in:
William Carroll 2020-07-30 19:52:04 +01:00
parent 6ecab8c3a6
commit 8ebc89b44b
5 changed files with 8 additions and 8 deletions

View file

@ -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)