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 ---------------------------------------------------------
|
||||
|
||||
(defservlet hello text/html ()
|
||||
(insert (spine-render "hello.mustache"
|
||||
(ht ("title" "Spine")
|
||||
("message" "Hello from Emacs.")))))
|
||||
(defservlet index text/html ()
|
||||
(let ((books (spine-books)))
|
||||
(if books
|
||||
(insert (spine-render-index books
|
||||
(ht-get (ht-from-query-string (httpd-query-string)) "id")))
|
||||
(insert (spine-render-empty-state)))))
|
||||
|
||||
;; --- start ------------------------------------------------------------
|
||||
(unless spine-skip-server-start
|
||||
|
||||
Reference in New Issue
Block a user