Clean up fetching recipes from db
This commit is contained in:
parent
7bb5186e3d
commit
80566eed03
1 changed files with 5 additions and 7 deletions
|
@ -67,13 +67,11 @@
|
|||
(vec)))
|
||||
|
||||
(defn get-current-recipes []
|
||||
(let [raw-recipes (mc/find-maps @db recipe-collection)
|
||||
sorted-recipes (sort-by :_id (vec raw-recipes))
|
||||
recipes (map (fn [r] (-> r
|
||||
(select-keys [:_id :name :grubs])
|
||||
(clojure.set/rename-keys {:_id :id})))
|
||||
sorted-recipes)]
|
||||
recipes))
|
||||
(->> (mc/find-maps @db recipe-collection)
|
||||
(sort-by :_id)
|
||||
(map #(select-keys % [:_id :name :grubs]))
|
||||
(map #(clojure.set/rename-keys % {:_id :id}))
|
||||
(vec)))
|
||||
|
||||
(def production-db "grub")
|
||||
(def development-db "grub-dev")
|
||||
|
|
Loading…
Reference in a new issue