- Create Newsletter Page: MailingList (without the class style, using Gulp tasks)#94
This commit is contained in:
30
src/server/models/cfgserver.js
Normal file
30
src/server/models/cfgserver.js
Normal 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);
|
||||
Reference in New Issue
Block a user