MongoDB find user by search returning all users
I am trying to query a user by their name field, and I am testing it in insomnia. I have my user schema like so: const userSchema = mongoose.Schema({ id: { type: String }, name: { type: String, required: true,…