File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -341,9 +341,9 @@ partiallyUpdateInterviewByRound.schema = Joi.object().keys({
341341 then : Joi . required ( ) ,
342342 otherwise : Joi . allow ( null )
343343 } ) ,
344- endTimestamp : Joi . date ( ) . greater ( 'now' ) . when ( 'startTimestamp ' , {
345- is : Joi . required ( ) ,
346- then : Joi . date ( ) . greater ( Joi . ref ( 'startTimestamp' ) ) ,
344+ endTimestamp : Joi . date ( ) . greater ( Joi . ref ( 'startTimestamp' ) ) . when ( 'status ' , {
345+ is : [ InterviewConstants . Status . Scheduled , InterviewConstants . Status . Rescheduled ] ,
346+ then : Joi . required ( ) ,
347347 otherwise : Joi . allow ( null )
348348 } ) ,
349349 hostName : Joi . string ( ) ,
@@ -401,9 +401,9 @@ partiallyUpdateInterviewById.schema = Joi.object().keys({
401401 then : Joi . required ( ) ,
402402 otherwise : Joi . allow ( null )
403403 } ) ,
404- endTimestamp : Joi . date ( ) . greater ( 'now' ) . when ( 'startTimestamp ' , {
405- is : Joi . required ( ) ,
406- then : Joi . date ( ) . greater ( Joi . ref ( 'startTimestamp' ) ) ,
404+ endTimestamp : Joi . date ( ) . greater ( Joi . ref ( 'startTimestamp' ) ) . when ( 'status ' , {
405+ is : [ InterviewConstants . Status . Scheduled , InterviewConstants . Status . Rescheduled ] ,
406+ then : Joi . required ( ) ,
407407 otherwise : Joi . allow ( null )
408408 } ) ,
409409 hostName : Joi . string ( ) ,
You can’t perform that action at this time.
0 commit comments