mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
Small Updates (#10701)
* small updates * fix client unit test * fix uuid validation
This commit is contained in:
@@ -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: [validator.isUUID, 'Invalid uuid.']},
|
||||
userId: {type: String, ref: 'User', required: true, validate: [(v) => validator.isUUID(v), 'Invalid uuid.']},
|
||||
}, {
|
||||
strict: true,
|
||||
minimize: false, // So empty objects are returned
|
||||
|
||||
Reference in New Issue
Block a user