mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-07 06:25:39 +02:00
feat(mongodb): mongodb3.5+ is unstable and error on $pushAll, meanTorrent can used on mongodb 3.5 3.6
#44
This commit is contained in:
@@ -36,16 +36,16 @@ var ArticleSchema = new Schema({
|
||||
type: String,
|
||||
default: 'def'
|
||||
}
|
||||
});
|
||||
}, {usePushEach: true});
|
||||
|
||||
ArticleSchema.statics.seed = seed;
|
||||
|
||||
mongoose.model('Article', ArticleSchema);
|
||||
|
||||
/**
|
||||
* Seeds the User collection with document (Article)
|
||||
* and provided options.
|
||||
*/
|
||||
* Seeds the User collection with document (Article)
|
||||
* and provided options.
|
||||
*/
|
||||
function seed(doc, options) {
|
||||
var Article = mongoose.model('Article');
|
||||
|
||||
@@ -71,7 +71,7 @@ function seed(doc, options) {
|
||||
|
||||
User
|
||||
.findOne({
|
||||
roles: { $in: ['admin'] }
|
||||
roles: {$in: ['admin']}
|
||||
})
|
||||
.exec(function (err, admin) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user