mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Removed required fields from user notifications (#9929)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user