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
reviewSchema.pre(/^findOneAnd/,asyncfunction(next){this.r=awaitthis.findOne();// console.log(this.r);next();});reviewSchema.post(/^findOneAnd/,asyncfunction(){// await this.findOne(); does NOT work here, query has already executedawaitthis.r.constructor.calcAverageRatings(this.r.tour);
The text was updated successfully, but these errors were encountered:
instead of
The text was updated successfully, but these errors were encountered: