summaryrefslogtreecommitdiff
path: root/main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'main.hs')
-rwxr-xr-xmain.hs6
1 files 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