File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ following:
7373 const query = { name: "Deli Llama" };
7474 const update = { $set: { name: "Deli Llama", address: "3 Nassau St" }};
7575 const options = {};
76- myColl.updateOne(query, update, options);
76+ const result = await myColl.updateOne(query, update, options);
7777
7878If a food truck named "Deli Llama" exists, the method call above updates
7979the document in the collection. However, if there are no food trucks named
@@ -96,7 +96,7 @@ update the document, we can set ``upsert`` to ``true`` in our call to
9696 const query = { name: "Deli Llama" };
9797 const update = { $set: { name: "Deli Llama", address: "3 Nassau St" }};
9898 const options = { upsert: true };
99- myColl.updateOne(query, update, options);
99+ const result = await myColl.updateOne(query, update, options);
100100
101101After you run the operation above, your collection looks similar to the
102102following, even if the ``"Deli Llama"`` document did not exist in your collection
You can’t perform that action at this time.
0 commit comments