diff options
author | Christopher Baines <mail@cbaines.net> | 2019-05-19 22:23:22 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-05-19 22:23:22 +0100 |
commit | 2c3533107528c9f58813f7f5c171e909ab7d2223 (patch) | |
tree | 935a87857e26fa6bf1636c67f0957923adb0a7a2 | |
parent | e92e095ee9bab35901f768c5712383649c588e70 (diff) | |
download | data-service-2c3533107528c9f58813f7f5c171e909ab7d2223.tar data-service-2c3533107528c9f58813f7f5c171e909ab7d2223.tar.gz |
Add #:code option to render-html
-rw-r--r-- | guix-data-service/web/render.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/guix-data-service/web/render.scm b/guix-data-service/web/render.scm index 248de3c..5121782 100644 --- a/guix-data-service/web/render.scm +++ b/guix-data-service/web/render.scm @@ -91,9 +91,12 @@ failure)) failure))) -(define* (render-html #:key sxml (extra-headers '())) - (list (append extra-headers - '((content-type . (text/html)))) +(define* (render-html #:key sxml (extra-headers '()) + (code 200)) + (list (build-response + #:code code + #:headers (append extra-headers + '((content-type . (text/html))))) (lambda (port) (sxml->html sxml port)))) |