models: add required: true to id fields where missing

This commit is contained in:
Matteo Pagliazzi
2016-12-18 17:16:49 +01:00
parent 472ec99291
commit 5e1e6be518
3 changed files with 3 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ export let schema = new Schema({
type: String,
default: uuid,
validate: [validator.isUUID, 'Invalid uuid.'],
required: true,
},
type: {type: String, required: true, enum: NOTIFICATION_TYPES},
data: {type: Schema.Types.Mixed, default: () => {