diff options
Diffstat (limited to 'main.hs')
-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 |