'Insert new documents in a schema

My question is that I have a first form in which the user enters an e-mail and a password then validates his e-mail, so I have a first schema already created before like this

`const exempleSchema = new mongoose.Schema ( { email: { type: String, required: true, validate: [isEmail], lowercase: true, unique: true, trim: true, }, password: { type: String, required: true, max: 1024, minlength: 6 } }, { timestamps: true, } );

const exemple = new mongoose.model("exemple", exempleSchema);`

and then once the user has to validate his e-mail address, a 2nd form is displayed where he must fill in his name, first name, his instagram & facebook account etc...

How to update my collections on mongoDB?

I heard about update for example (I start)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source