Add :partial option to renderer

This commit is contained in:
Akira Tempaku 2025-05-03 08:18:51 +09:00
commit d7f5a39fc8
Signed by: paku
GPG key ID: 5B4E8402BCC50607

View file

@ -24,14 +24,16 @@
(defmethod jingle:process-response ((app jingle:app) result) (defmethod jingle:process-response ((app jingle:app) result)
(set-response-header :content-type "text/html; charset=utf-8") (set-response-header :content-type "text/html; charset=utf-8")
(call-next-method app
(hsx:render-to-string
(match result (match result
((plist :body body ((plist :body body
:metadata metadata :metadata metadata
:cache cache) :cache cache
(progn :partial partial)
(set-cache-control cache) (set-cache-control cache)
(call-next-method app
(hsx:render-to-string
(if partial
body
(~layout :metadata metadata (~layout :metadata metadata
body))) body)))))
(_ (error "Invalid response form")))))) (_ (error "Invalid response form"))))