@@ -1165,7 +1165,9 @@ createChallenge.schema = {
1165
1165
tags : Joi . array ( ) . items ( Joi . string ( ) ) , // tag names
1166
1166
projectId : Joi . number ( ) . integer ( ) . positive ( ) ,
1167
1167
legacyId : Joi . number ( ) . integer ( ) . positive ( ) ,
1168
- constraints : Joi . array ( ) . items ( Joi . string ( ) ) . min ( 1 ) . optional ( ) ,
1168
+ constraints : Joi . object ( ) . keys ( {
1169
+ allowedRegistrants : Joi . array ( ) . items ( Joi . string ( ) ) . optional ( )
1170
+ } ) . optional ( ) ,
1169
1171
startDate : Joi . date ( ) . iso ( ) ,
1170
1172
status : Joi . string ( ) . valid ( [
1171
1173
constants . challengeStatuses . Active ,
@@ -1992,7 +1994,9 @@ updateChallenge.schema = {
1992
1994
tags : Joi . array ( ) . items ( Joi . string ( ) . required ( ) ) . min ( 1 ) , // tag names
1993
1995
projectId : Joi . number ( ) . integer ( ) . positive ( ) ,
1994
1996
legacyId : Joi . number ( ) . integer ( ) . positive ( ) ,
1995
- constraints : Joi . object ( { allowedRegistrants : Joi . array ( ) . items ( Joi . string ( ) ) . optional ( ) } ) ,
1997
+ constraints : Joi . object ( ) . keys ( {
1998
+ allowedRegistrants : Joi . array ( ) . items ( Joi . string ( ) ) . optional ( )
1999
+ } ) . optional ( ) ,
1996
2000
status : Joi . string ( ) . valid ( _ . values ( constants . challengeStatuses ) ) ,
1997
2001
attachments : Joi . array ( ) . items (
1998
2002
Joi . object ( ) . keys ( {
0 commit comments