Small Updates (#10701)

* small updates

* fix client unit test

* fix uuid validation
This commit is contained in:
Matteo Pagliazzi
2018-09-20 15:01:12 +02:00
committed by GitHub
parent 33a8072d23
commit dd7fa73961
13 changed files with 1238 additions and 636 deletions

View File

@@ -31,8 +31,8 @@ let schema = new Schema({
todos: [{type: String, ref: 'Task'}],
rewards: [{type: String, ref: 'Task'}],
},
leader: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.'], required: true},
group: {type: String, ref: 'Group', validate: [validator.isUUID, 'Invalid uuid.'], required: true},
leader: {type: String, ref: 'User', validate: [(v) => validator.isUUID(v), 'Invalid uuid.'], required: true},
group: {type: String, ref: 'Group', validate: [(v) => validator.isUUID(v), 'Invalid uuid.'], required: true},
memberCount: {type: Number, default: 0},
prize: {type: Number, default: 0, min: 0},
categories: [{