Upgrade mongoose (#10767)

* fix mongoose and upgrade

* fix more validations
This commit is contained in:
Matteo Pagliazzi
2018-10-23 13:25:14 +02:00
committed by GitHub
parent d49db6d367
commit c813afba44
13 changed files with 107 additions and 67 deletions

View File

@@ -8,7 +8,7 @@ module.exports = function baseModel (schema, options = {}) {
_id: {
type: String,
default: uuid,
validate: [validator.isUUID, 'Invalid uuid.'],
validate: [v => validator.isUUID(v), 'Invalid uuid.'],
},
});
}