- Create Newsletter Page: MailingList (without the class style, using Gulp tasks)#94

This commit is contained in:
Paolo Arena
2019-11-21 00:18:40 +01:00
parent 20a3120054
commit f7fa0c4909
54 changed files with 675 additions and 51 deletions

View File

@@ -0,0 +1,30 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
mongoose.Promise = global.Promise;
mongoose.level = "F";
const { ObjectID } = require('mongodb');
// Resolving error Unknown modifier: $pushAll
mongoose.plugin(schema => {
schema.options.usePushEach = true
});
const cfgserverSchema = new Schema({
chiave: {
type: String,
required: true,
trim: true,
minlength: 1,
unique: true,
},
userId: {
type: String,
},
valore: {
type: String,
},
});
mongoose.model('cfgserver', cfgserverSchema);