Skip to content

Commit

Permalink
Saving layers now care about the db-save parameter of both layer and …
Browse files Browse the repository at this point in the history
…sync-info, bumping version to 0.2.11
  • Loading branch information
davber committed Jun 13, 2022
1 parent a425ad1 commit 613bfdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject org.clojars.davber/remongo "0.2.10"
(defproject org.clojars.davber/remongo "0.2.11"
:description "ClojureScript library synchronizing Re-frame DB's and MongoDB via Realm"
:url "https://clojars.org/org.clojars.davber/remongo"
:license {:name "Unlicense"
Expand Down
4 changes: 3 additions & 1 deletion src/remongo/mongo.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@
path-key (utils/stringify (:path-key layer))
[db enhanced-db] (<! db-chan)
collection (:collection layer)
db-name (or (:db layer) (:db sync-info))]
;; We first try with the the layer config, then the sync info as a whole, looking at db-save first
db-name (or (:db-save layer) (:db layer)
(:db-save sync-info) (:db sync-info))]
;; TODO: actually enhance the DB rather than just passing the same one around...
(timbre/info "<sync-save-layer with layer" layer "and path" path "and path-key" path-key)
(case (:kind layer)
Expand Down

0 comments on commit 613bfdd

Please sign in to comment.