diff options
author | Ben Sima <ben@bsima.me> | 2018-01-23 10:16:50 -0800 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2018-01-23 10:16:50 -0800 |
commit | 27c960910494b51a98d0d4d76bbdf49917198c0e (patch) | |
tree | 17d2f20a7cfd6e6a7b775effa7f1d4517ffc279d | |
parent | 3560aad683d32b2719d9abd0e52dbe536d8a416b (diff) |
Switch to more-correct versions of update/query fns
-rwxr-xr-x | main.hs | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -27,7 +27,6 @@ {-# LANGUAGE RecordWildCards #-} import Data.Acid -import Data.Acid.Advanced (update', query') import Data.Acid.Local (createCheckpointAndClose) import qualified Data.ByteString.Lazy as BSL import qualified Data.Csv as Csv @@ -184,14 +183,13 @@ getQueryR = do Nothing -> do app <- getYesod let db = appState app - callers <- query' db $ ViewCallers 20 + callers <- liftIO $ query db $ ViewCallers 20 sendStatusJSON status200 $ object [ "results" .= callers ] Just q -> do app <- getYesod let db = appState app - caller <- query' db $ CallerByNumber $ PhoneNumber q - $logInfo $ pack $ show caller + caller <- liftIO $ query db $ CallerByNumber $ PhoneNumber q sendStatusJSON status200 $ object [ "results" .= caller ] data PostRequest = PostRequest |