Debug erroneous table name

"Session" doesn't exist, but "Sessions" does.
This commit is contained in:
William Carroll 2020-07-30 09:51:32 +01:00
parent fdd51f626c
commit ca26fcd523

View file

@ -20,7 +20,7 @@ isValid session = do
-- | Lookup the session by UUID.
get :: FilePath -> T.SessionUUID -> IO (Maybe T.StoredSession)
get dbFile uuid = withConnection dbFile $ \conn -> do
res <- query conn "SELECT * FROM Session WHERE uuid = ?" (Only uuid)
res <- query conn "SELECT * FROM Sessions WHERE uuid = ?" (Only uuid)
case res of
[x] -> pure (Just x)
_ -> pure Nothing