From e4a38bca701eaf4a29254b13ac01837fb4fe5dd6 Mon Sep 17 00:00:00 2001 From: gered Date: Wed, 22 May 2013 23:36:25 -0400 Subject: [PATCH] indentation --- src/blarg/models/files.clj | 42 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/blarg/models/files.clj b/src/blarg/models/files.clj index ff16451..c29129d 100644 --- a/src/blarg/models/files.clj +++ b/src/blarg/models/files.clj @@ -8,31 +8,31 @@ (defn get-file [file] (let [f (ensure-prefix file "/")] (couch/with-db files - (if-let [file-info (->first-view-value - (couch/get-view "files" "listPublished" {:key f}))] - (let [id (:_id file-info) - attachment (:filename file-info) - attachment-info (second (first (:_attachments file-info))) - gz (couch/get-attachment id attachment)] - (if gz - (merge - {:data gz} - attachment-info))))))) + (if-let [file-info (->first-view-value + (couch/get-view "files" "listPublished" {:key f}))] + (let [id (:_id file-info) + attachment (:filename file-info) + attachment-info (second (first (:_attachments file-info))) + gz (couch/get-attachment id attachment)] + (if gz + (merge + {:data gz} + attachment-info))))))) (defn list-files [path] (let [p (ensure-prefix-suffix path "/")] (if-let [file-list (->view-values - (couch/with-db files - (couch/get-view "files" "listPublishedByPath" {:key p})))] - (map - (fn [f] - (let [attachment (second (first (:_attachments f)))] - {:id (:_id f) - :filename (:filename f) - :last_modified (parse-timestamp (:last_modified_at f)) - :content-type (:content_type attachment) - :size (:length attachment)})) - file-list)))) + (couch/with-db files + (couch/get-view "files" "listPublishedByPath" {:key p})))] + (map + (fn [f] + (let [attachment (second (first (:_attachments f)))] + {:id (:_id f) + :filename (:filename f) + :last_modified (parse-timestamp (:last_modified_at f)) + :content-type (:content_type attachment) + :size (:length attachment)})) + file-list)))) (defn get-tree [] (->view-keys