How can I see a user I just created on MongoDB using "register" function inside "passport" module, within a NodeJS application? #11903
Labels
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
Prerequisites
Mongoose version
6.0.11
Node.js version
14.x
MongoDB version
5
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Issue
I am creating a new user by the following code:
But when I try:
I get this result:
And by trying this:
console.log("the username is" , User.username);
I get:
Also in the post man I can see this result:
For this line of the code:
I don't know if an error happens while I am creating a new user and this result is because of that or it's normal responses and I must see the saved user somehow differen?
Also this is my
user.js
file if it helps:The text was updated successfully, but these errors were encountered: