viewURL :: String -> Maybe String -> AppM String
viewURL tag mkey = viewA agonCouchDBURL >>= return . (++ ("_design/agon/_view/" ++ tag ++ keyStr))
    where
    keyStr = case mkey of
        Nothing -> ""
        (Just k) -> "?key=" ++ k
viewURL :: String -> Maybe String -> AppM String
viewURL tag mkey = viewA agonCouchDBURL >>= return . (++ ("_design/agon/_view/" ++ tag ++ keyStr))
    where
    keyStr = case mkey of
        Nothing -> ""
        (Just k) -> "?key=" ++ k
viewURL tag mkey = viewA agonCouchDBURL >>= return . (++ ("_design/agon/_view/" ++ tag ++ keyStr))
    where
    keyStr = case mkey of
        Nothing -> ""
        (Just k) -> "?key=" ++ k