Browse files

Added not-found route

  • Loading branch information...
1 parent 090646c commit 2755d1bba05b7df36227a39a879271bfecb4b488 @weavejester committed Apr 27, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/compojure/route.clj
View
5 src/compojure/route.clj
@@ -14,3 +14,8 @@
(GET (add-wildcard path) {{file-path "*"} :params}
(let [options (merge {:root "public"} options)]
(file-response file-path options))))
+
+(defn not-found
+ "A route that returns a 404 not found response."
+ [body]
+ (ANY "*" [] {:status 404, :body body}))

0 comments on commit 2755d1b

Please sign in to comment.