mercredi 31 octobre 2018

TypeError: Invalid select () argument. Must be string or object" error

I'm stuck here. I keep getting "TypeError: Invalid select () argument. Must be string or object" error.

The objective is to prevent users not logged in from making comments using middleware

I passed in the middleware function into the comment route already. But once I try adding a new comment, it brings this error.

What could be causing it? Please help. I'm using colt web developer bootcamp to learn.

Please help, I'm stuck.

User Schema

Passing Middleware function into comment route

Middleware function




Aucun commentaire:

Enregistrer un commentaire