mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
clarify all "Invalid uuid" messages by making each unique
This commit is contained in:
@@ -404,7 +404,7 @@ export default new Schema({
|
||||
default: () => ({}),
|
||||
},
|
||||
|
||||
challenges: [{ $type: String, ref: 'Challenge', validate: [v => validator.isUUID(v), 'Invalid uuid.'] }],
|
||||
challenges: [{ $type: String, ref: 'Challenge', validate: [v => validator.isUUID(v), 'Invalid uuid for user challenges.'] }],
|
||||
|
||||
invitations: {
|
||||
// Using an array without validation because otherwise mongoose
|
||||
@@ -424,7 +424,7 @@ export default new Schema({
|
||||
$type: String,
|
||||
ref: 'Group',
|
||||
required: true,
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid.'],
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid for user invitation party id.'],
|
||||
},
|
||||
name: {
|
||||
$type: String,
|
||||
@@ -434,15 +434,15 @@ export default new Schema({
|
||||
$type: String,
|
||||
ref: 'User',
|
||||
required: true,
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid.'],
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid for user invitation inviter id.'],
|
||||
},
|
||||
}],
|
||||
},
|
||||
|
||||
guilds: [{ $type: String, ref: 'Group', validate: [v => validator.isUUID(v), 'Invalid uuid.'] }],
|
||||
guilds: [{ $type: String, ref: 'Group', validate: [v => validator.isUUID(v), 'Invalid uuid for user guild.'] }],
|
||||
|
||||
party: {
|
||||
_id: { $type: String, validate: [v => validator.isUUID(v), 'Invalid uuid.'], ref: 'Group' },
|
||||
_id: { $type: String, validate: [v => validator.isUUID(v), 'Invalid uuid for user party.'], ref: 'Group' },
|
||||
order: { $type: String, default: 'level' },
|
||||
orderAscending: { $type: String, default: 'ascending' },
|
||||
quest: {
|
||||
|
||||
Reference in New Issue
Block a user