const userObjectId = mongoose.Types.ObjectId(userIdString); await UserModel.updateOne({ _id: userObjectId }, { $set: { isVerifiedEmail: true } }).catch( error => { console.log(error); } ); console.log('user updated');