Skip to content

Commit

Permalink
feat: make router:get-content-type-for-code public
Browse files Browse the repository at this point in the history
  • Loading branch information
line-o committed Jan 8, 2021
1 parent f6d6694 commit 32f06b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/router.xql
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ declare %private function router:execute-handler ($request as map(*), $response

(: content types :)

declare %private function router:get-content-type-for-code ($config as map(*), $code as xs:integer, $fallback as xs:string) as xs:string {
declare function router:get-content-type-for-code ($config as map(*), $code as xs:integer, $fallback as xs:string) as xs:string {
let $response-definition := head(($config?responses?($code), $config?responses?default))
let $content :=
if (exists($response-definition) and $response-definition instance of map(*))
Expand Down

0 comments on commit 32f06b9

Please sign in to comment.