* removed an unnecessary tempVar

This commit is contained in:
Vincent Ambo 2012-03-03 03:42:44 +01:00
parent 907eecf8c7
commit 9e4b35613c

View file

@ -108,8 +108,7 @@ stripResult (Error s) = error $ "JSON error: " ++ s
getMonthCount :: Int -> Int -> ServerPart Int getMonthCount :: Int -> Int -> ServerPart Int
getMonthCount y m = do getMonthCount y m = do
count <- queryDB "countDE" $ makeQuery startkey endkey count <- queryDB "countDE" $ makeQuery startkey endkey
let x = map (stripResult . fromJSON . snd) count return . stripCount $ map (stripResult . fromJSON . snd) count
return $ stripCount x
where where
startkey = JSArray [toJSON ("count" :: String), toJSON y, toJSON m] startkey = JSArray [toJSON ("count" :: String), toJSON y, toJSON m]
endkey = JSArray [toJSON ("count" :: String), toJSON y, toJSON m, JSObject (toJSObject [] )] endkey = JSArray [toJSON ("count" :: String), toJSON y, toJSON m, JSObject (toJSObject [] )]