only serve published files
This commit is contained in:
parent
0e68ce12b1
commit
65de2410a3
|
@ -6,7 +6,7 @@
|
|||
(defn get-file [file]
|
||||
(couch/with-db files
|
||||
(if-let [file-info (->first-view-value
|
||||
(couch/get-view "files" "listAll" {:key file}))]
|
||||
(couch/get-view "files" "listPublished" {:key file}))]
|
||||
(let [id (:_id file-info)
|
||||
attachment (:filename file-info)
|
||||
attachment-info (second (first (:_attachments file-info)))
|
||||
|
|
Reference in a new issue