#86 Query Middleware | Using MongoDB with Express | A Complete NODE JS Course

preview_player
Показать описание
In the last lecture, we learned about document middleware of mongoose. In this lecture, let's learn about query middleware. Query middleware allows us to run a function before or after a query get executed.
Рекомендации по теме
Комментарии
Автор

isn't this.find in post hook unnecessary? because the query has already run on the db, if we really want to filter, shouldn't we use filter method on docs itself?

vinaykumarkharwar