little bit of cleanup

This commit is contained in:
Gered 2013-05-21 22:42:19 -04:00
parent f8f1f2d6ff
commit f6868031b5

View file

@ -7,9 +7,9 @@
[noir.response :as resp]))
(defn get-file [path]
(if-let [file (files/get-file (ensure-prefix path "/"))]
(if-let [file (files/get-file path)]
(resp/content-type (:content_type file) (:data file))
(resp/status 404 nil)))
(defroutes files-routes
(GET "/files/*" [*] (get-file *)))
(GET "/files/*" [*] (get-file (ensure-prefix * "/"))))