Skip to content

Commit

Permalink
Using deleteOne rather than delete from the Web SDK of Realm, since t…
Browse files Browse the repository at this point in the history
…he latter doesn't seem to be defined anymore
  • Loading branch information
davber committed Aug 16, 2021
1 parent 77e7c68 commit d44c161
Show file tree
Hide file tree
Showing 2 changed files with 2 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.1"
(defproject org.clojars.davber/remongo "0.2.2"
: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
2 changes: 1 addition & 1 deletion src/remongo/mongo.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
(defn <delete
"Delete one specific document"
[db-name coll-name doc]
(go (-> (mongo-collection db-name coll-name) (.delete (clj->js doc)) (<p!) (js->clj))))
(go (-> (mongo-collection db-name coll-name) (.deleteOne (clj->js {"_id" (get doc "_id")})) (<p!) (js->clj))))

(defn <deleteSeq
"Helper to delete a sequence of documents, returning sequence of results"
Expand Down

0 comments on commit d44c161

Please sign in to comment.