Revert "Small Updates (#10701)" (#10702)

This reverts commit dd7fa73961.
This commit is contained in:
Matteo Pagliazzi
2018-09-20 22:36:46 +02:00
committed by GitHub
parent dd7fa73961
commit 4394772ee3
13 changed files with 635 additions and 1237 deletions

View File

@@ -7,7 +7,7 @@ const Schema = mongoose.Schema;
export let schema = new Schema({
_id: {type: String, required: true}, // Use a custom string as _id
consumed: {type: Boolean, default: false, required: true},
userId: {type: String, ref: 'User', required: true, validate: [(v) => validator.isUUID(v), 'Invalid uuid.']},
userId: {type: String, ref: 'User', required: true, validate: [validator.isUUID, 'Invalid uuid.']},
}, {
strict: true,
minimize: false, // So empty objects are returned