little bit of cleanup
This commit is contained in:
parent
f8f1f2d6ff
commit
f6868031b5
|
@ -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 * "/"))))
|
||||
|
|
Reference in a new issue