Check for GTE instead of GT

Somebody incremenet the total number of off-by-one errors that I've made in my
career. I think the current count is 99... or is it 100? 101? Who knows?!
This commit is contained in:
William Carroll 2020-07-30 19:53:46 +01:00
parent ea31a01497
commit 75437b01b6

View file

@ -145,7 +145,7 @@ server T.Config{..} = createAccount
liftIO $ LoginAttempts.increment dbFile username
throwError err401 { errBody = "Your credentials are invalid" }
Just attempts ->
if attempts > 3 then
if attempts >= 3 then
throwError err429
else if T.passwordsMatch password accountPassword then do
uuid <- liftIO $ Sessions.findOrCreate dbFile account