Revert "Small Updates (#10701)" (#10702)

This reverts commit dd7fa73961.
This commit is contained in:
Matteo Pagliazzi
2018-09-20 22:36:46 +02:00
committed by GitHub
parent dd7fa73961
commit 4394772ee3
13 changed files with 635 additions and 1237 deletions

View File

@@ -373,7 +373,7 @@ let schema = new Schema({
return {};
}},
challenges: [{type: String, ref: 'Challenge', validate: [(v) => validator.isUUID(v), 'Invalid uuid.']}],
challenges: [{type: String, ref: 'Challenge', validate: [validator.isUUID, 'Invalid uuid.']}],
invitations: {
// Using an array without validation because otherwise mongoose treat this as a subdocument and applies _id by default
@@ -390,7 +390,7 @@ let schema = new Schema({
type: String,
ref: 'Group',
required: true,
validate: [(v) => validator.isUUID(v), 'Invalid uuid.'],
validate: [validator.isUUID, 'Invalid uuid.'],
},
name: {
type: String,
@@ -400,15 +400,15 @@ let schema = new Schema({
type: String,
ref: 'User',
required: true,
validate: [(v) => validator.isUUID(v), 'Invalid uuid.'],
validate: [validator.isUUID, 'Invalid uuid.'],
},
}],
},
guilds: [{type: String, ref: 'Group', validate: [(v) => validator.isUUID(v), 'Invalid uuid.']}],
guilds: [{type: String, ref: 'Group', validate: [validator.isUUID, 'Invalid uuid.']}],
party: {
_id: {type: String, validate: [(v) => validator.isUUID(v), 'Invalid uuid.'], ref: 'Group'},
_id: {type: String, validate: [validator.isUUID, 'Invalid uuid.'], ref: 'Group'},
order: {type: String, default: 'level'},
orderAscending: {type: String, default: 'ascending'},
quest: {