You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/model.js
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1760,9 +1760,7 @@ Model.listIndexes = async function listIndexes() {
1760
1760
*
1761
1761
* #### Example:
1762
1762
*
1763
-
* Event.ensureIndexes(function (err) {
1764
-
* if (err) return handleError(err);
1765
-
* });
1763
+
* await Event.ensureIndexes();
1766
1764
*
1767
1765
* After completion, an `index` event is emitted on this `Model` passing an error if one occurred.
1768
1766
*
@@ -1773,7 +1771,7 @@ Model.listIndexes = async function listIndexes() {
1773
1771
*
1774
1772
* Event.on('index', function (err) {
1775
1773
* if (err) console.error(err); // error occurred during index creation
1776
-
* })
1774
+
* });
1777
1775
*
1778
1776
* _NOTE: It is not recommended that you run this in production. Index creation may impact database performance depending on your load. Use with caution._
0 commit comments