do a proper redirect if a file cannot be served up

This commit is contained in:
Gered 2013-06-07 20:14:08 -04:00
parent a00b7a1b2d
commit fae0940f3a

View file

@ -66,7 +66,7 @@
(defn get-file [path]
(if-let [file (files/get-file path (auth/logged-in?))]
(resp/content-type (:content_type file) (:data file))
(resp/status 404 nil)))
(resp/redirect "/notfound")))
(defroutes files-routes
(restricted GET "/listfiles" [] (list-files "/"))