* removed an unnecessary tempVar
This commit is contained in:
parent
907eecf8c7
commit
9e4b35613c
1 changed files with 1 additions and 2 deletions
|
@ -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 [] )]
|
||||||
|
|
Loading…
Reference in a new issue