diff options
| author | bjorn <bjorn@bringert.net> | 2008-09-17 12:42:05 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-09-17 12:42:05 +0000 |
| commit | c99ce1fd0dd00cf5eea83c4ebb2edb9378024356 (patch) | |
| tree | e7f3a2449378d84b99af3904c32b31d80ae8f290 /src | |
| parent | db6ff30694da3a52e69c0c78f4b885027e88cf53 (diff) | |
fastcgi: rename /info to /grammar
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/MainFastCGI.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/MainFastCGI.hs b/src/server/MainFastCGI.hs index 016ddc773..47aabacf3 100644 --- a/src/server/MainFastCGI.hs +++ b/src/server/MainFastCGI.hs @@ -36,7 +36,7 @@ cgiMain pgf = "/complete" -> return (doComplete pgf) `ap` getText `ap` getCat `ap` getFrom `ap` getLimit "/linearize" -> return (doLinearize pgf) `ap` getTree `ap` getTo "/translate" -> return (doTranslate pgf) `ap` getText `ap` getCat `ap` getFrom `ap` getTo - "/info" -> return (doInfo pgf) `ap` requestAcceptLanguage + "/grammar" -> return (doGrammar pgf) `ap` requestAcceptLanguage _ -> throwCGIError 404 "Not Found" ["Resource not found: " ++ path] outputJSON json where @@ -100,8 +100,8 @@ doLinearize :: PGF -> PGF.Tree -> Maybe PGF.Language -> JSValue doLinearize pgf tree mto = showJSON $ map toJSObject [[("to",to),("text",text)] | (to,text) <- linearize' pgf mto tree] -doInfo :: PGF -> Maybe (Accept Language) -> JSValue -doInfo pgf macc = showJSON $ toJSObject +doGrammar :: PGF -> Maybe (Accept Language) -> JSValue +doGrammar pgf macc = showJSON $ toJSObject [("name", showJSON (PGF.abstractName pgf)), ("userLanguage", showJSON (selectLanguage pgf macc)), ("categories", showJSON categories), |
