From 27c960910494b51a98d0d4d76bbdf49917198c0e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 23 Jan 2018 10:16:50 -0800 Subject: Switch to more-correct versions of update/query fns --- main.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.hs b/main.hs index e383359..ff2c0a1 100755 --- a/main.hs +++ b/main.hs @@ -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 -- cgit v1.2.3