Add :partial option to renderer

This commit is contained in:
Akira Tempaku 2025-05-03 08:18:51 +09:00
parent e4b7303d5b
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 (match result
(hsx:render-to-string ((plist :body body
(match result :metadata metadata
((plist :body body :cache cache
:metadata metadata :partial partial)
:cache cache) (set-cache-control cache)
(progn (call-next-method app
(set-cache-control cache) (hsx:render-to-string
(~layout :metadata metadata (if partial
body))) body
(_ (error "Invalid response form")))))) (~layout :metadata metadata
body)))))
(_ (error "Invalid response form"))))