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:
73
73
const query = { name: "Deli Llama" };
74
74
const update = { $set: { name: "Deli Llama", address: "3 Nassau St" }};
75
75
const options = {};
76
- myColl.updateOne(query, update, options);
76
+ const result = await myColl.updateOne(query, update, options);
77
77
78
78
If a food truck named "Deli Llama" exists, the method call above updates
79
79
the 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
96
96
const query = { name: "Deli Llama" };
97
97
const update = { $set: { name: "Deli Llama", address: "3 Nassau St" }};
98
98
const options = { upsert: true };
99
- myColl.updateOne(query, update, options);
99
+ const result = await myColl.updateOne(query, update, options);
100
100
101
101
After you run the operation above, your collection looks similar to the
102
102
following, even if the ``"Deli Llama"`` document did not exist in your collection
You can’t perform that action at this time.
0 commit comments