Improve response handling

This commit is contained in:
Akira Tempaku 2024-10-02 23:36:30 +09:00
parent 2866e2fcbc
commit 34eb2e000a
4 changed files with 18 additions and 24 deletions
src/routes

View file

@ -1,7 +1,7 @@
(defpackage #:hp/routes/not-found
(:use #:cl
#:hsx
#:hp/response)
#:hsx)
(:local-nicknames (#:jg #:jingle))
(:export #:handle-not-found))
(in-package #:hp/routes/not-found)
@ -11,9 +11,9 @@
(defcomp page ()
(hsx
(h1 "404 Not Found")))
(h1 :class "text-primary"
"404 Not Found")))
(defun handle-not-found ()
(response (page)
:status :not-found
:metadata *metadata*))
(jg:set-response-status :not-found)
(list (page) *metadata*))