From f6868031b52fdd7ff78bd7dc91a2dae106fce6b1 Mon Sep 17 00:00:00 2001 From: gered Date: Tue, 21 May 2013 22:42:19 -0400 Subject: [PATCH] little bit of cleanup --- src/blarg/routes/files.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blarg/routes/files.clj b/src/blarg/routes/files.clj index e14767d..382bc17 100644 --- a/src/blarg/routes/files.clj +++ b/src/blarg/routes/files.clj @@ -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 * "/"))))