Skip to content

Commit

Permalink
Merge pull request #14252 from Automattic/vkarpov15/gh-14238
Browse files Browse the repository at this point in the history
docs(model): remove callback example for `ensureIndexes()`
  • Loading branch information
vkarpov15 committed Jan 12, 2024
2 parents ec4191e + 024c029 commit 9ed507a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -1671,9 +1671,7 @@ Model.listIndexes = async function listIndexes() {
*
* #### Example:
*
* Event.ensureIndexes(function (err) {
* if (err) return handleError(err);
* });
* await Event.ensureIndexes();
*
* After completion, an `index` event is emitted on this `Model` passing an error if one occurred.
*
Expand All @@ -1684,7 +1682,7 @@ Model.listIndexes = async function listIndexes() {
*
* Event.on('index', function (err) {
* if (err) console.error(err); // error occurred during index creation
* })
* });
*
* _NOTE: It is not recommended that you run this in production. Index creation may impact database performance depending on your load. Use with caution._
*
Expand Down

0 comments on commit 9ed507a

Please sign in to comment.