Loading max.xq +1 −10 Original line number Diff line number Diff line Loading @@ -8,15 +8,6 @@ import module namespace max.toc = 'pddn/max/toc' at 'rxq/toc.xqm'; import module namespace max.api = 'pddn/max/max_api' at 'rxq/max_api.xqm'; import module namespace request = "http://exquery.org/ns/request"; declare %output:method("text") %rest:path("") function max:error404() { <rest:response> <http:response status="404"> <http:header name="Content-Language" value="en"/> <http:header name="Content-Type" value="text/plain; charset=utf-8"/> </http:response> </rest:response>, "The requested resource is not available." }; (:MaX Home:) declare Loading @@ -28,7 +19,7 @@ declare function max:home(){ let $jsonFile := file:parent(static-base-uri()) ||'package.json' return if(not(file:exists($jsonFile))) then max:error404() (:no max.html in production env.:) then max.util:error404() (:no max.html in production env.:) else let $json := file:read-text($jsonFile) let $version := json:parse($json)//version Loading Loading
max.xq +1 −10 Original line number Diff line number Diff line Loading @@ -8,15 +8,6 @@ import module namespace max.toc = 'pddn/max/toc' at 'rxq/toc.xqm'; import module namespace max.api = 'pddn/max/max_api' at 'rxq/max_api.xqm'; import module namespace request = "http://exquery.org/ns/request"; declare %output:method("text") %rest:path("") function max:error404() { <rest:response> <http:response status="404"> <http:header name="Content-Language" value="en"/> <http:header name="Content-Type" value="text/plain; charset=utf-8"/> </http:response> </rest:response>, "The requested resource is not available." }; (:MaX Home:) declare Loading @@ -28,7 +19,7 @@ declare function max:home(){ let $jsonFile := file:parent(static-base-uri()) ||'package.json' return if(not(file:exists($jsonFile))) then max:error404() (:no max.html in production env.:) then max.util:error404() (:no max.html in production env.:) else let $json := file:read-text($jsonFile) let $version := json:parse($json)//version Loading