Posts by Wender • 16 points
1 post
-
0
votes1
answer470
viewsA: Error in Mongoose findOne
findOne expects a document/object as parameter, not only a String as you passed it. Check in the example below: const User = mongoose.model('users', mySchema); const query = 'texto pesquisado';…