response implemented

This commit is contained in:
Christian Mueller
2014-01-29 20:18:32 +01:00
parent 76afc00b14
commit 2164ae1a60
+4 -3
View File
@@ -77,9 +77,10 @@
"Sets a custom message for each needed HTTP status.
The message to be assigned is extracted with a dynamically generated key"
[code]
(let [message (get-message (keyword (str "status-" code)))]
{:status code
:body (let [message (get-message (keyword (str "status-" code)))]
(layout message
[:article [:h1 message]])))
[:article [:h1 message]]))})
(defn redirect [url]
{:status 302
@@ -205,7 +206,7 @@
(response 500))))
(route/resources "/")
(route/not-found "Not Found"))
(route/not-found (response 404)))
(def app
(handler/site app-routes))