feat: wire up / index handler replacing /hello
This commit is contained in:
@@ -227,10 +227,12 @@ Set by test harnesses that only need the model functions.")
|
|||||||
|
|
||||||
;; --- handlers ---------------------------------------------------------
|
;; --- handlers ---------------------------------------------------------
|
||||||
|
|
||||||
(defservlet hello text/html ()
|
(defservlet index text/html ()
|
||||||
(insert (spine-render "hello.mustache"
|
(let ((books (spine-books)))
|
||||||
(ht ("title" "Spine")
|
(if books
|
||||||
("message" "Hello from Emacs.")))))
|
(insert (spine-render-index books
|
||||||
|
(ht-get (ht-from-query-string (httpd-query-string)) "id")))
|
||||||
|
(insert (spine-render-empty-state)))))
|
||||||
|
|
||||||
;; --- start ------------------------------------------------------------
|
;; --- start ------------------------------------------------------------
|
||||||
(unless spine-skip-server-start
|
(unless spine-skip-server-start
|
||||||
|
|||||||
Reference in New Issue
Block a user