Removed required fields from user notifications (#9929)

This commit is contained in:
Keith Holliday
2018-02-02 12:31:52 -07:00
committed by GitHub
parent a3ddd0746c
commit 4e01b14874

View File

@@ -38,14 +38,22 @@ export let schema = new Schema({
type: String, type: String,
default: uuid, default: uuid,
validate: [validator.isUUID, 'Invalid uuid.'], validate: [validator.isUUID, 'Invalid uuid.'],
required: true, // required: true, // @TODO: Add these back once we figure out the issue with notifications
},
type: {
type: String,
// required: true,
enum: NOTIFICATION_TYPES,
}, },
type: {type: String, required: true, enum: NOTIFICATION_TYPES},
data: {type: Schema.Types.Mixed, default: () => { data: {type: Schema.Types.Mixed, default: () => {
return {}; return {};
}}, }},
// A field to mark the notification as seen without deleting it, optional use // A field to mark the notification as seen without deleting it, optional use
seen: {type: Boolean, required: true, default: () => false}, seen: {
type: Boolean,
// required: true,
default: () => false,
},
}, { }, {
strict: true, strict: true,
minimize: false, // So empty objects are returned minimize: false, // So empty objects are returned