diff --git a/pandoc-cgi/PandocCGI.hs b/pandoc-cgi/PandocCGI.hs index 73825311b..11a3af0bb 100644 --- a/pandoc-cgi/PandocCGI.hs +++ b/pandoc-cgi/PandocCGI.hs @@ -44,6 +44,8 @@ type API = "convert" :> ReqBody '[JSON] Params :> Post '[PlainText, JSON] Text :<|> "convert-batch" :> ReqBody '[JSON] [Params] :> Post '[JSON] [Text] + :<|> + "version" :> Get '[PlainText, JSON] Text app :: Application app = serve api server @@ -54,6 +56,7 @@ api = Proxy server :: Server API server = convert :<|> mapM convert + :<|> pure pandocVersion where -- We use runPure for the pandoc conversions, which ensures that -- they will do no IO. This makes the server safe to use. However,