fix: add video ids and better test for video id
This commit is contained in:
@ -3,6 +3,7 @@ id: 5e6a54af58d3af90110a60a1
|
|||||||
title: Introduction B
|
title: Introduction B
|
||||||
challengeType: 11
|
challengeType: 11
|
||||||
isRequired: true
|
isRequired: true
|
||||||
|
videoId: H6qtjRTfSog
|
||||||
---
|
---
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
@ -3,6 +3,7 @@ id: 5e6a54ba58d3af90110a60a2
|
|||||||
title: Introduction C
|
title: Introduction C
|
||||||
challengeType: 11
|
challengeType: 11
|
||||||
isRequired: true
|
isRequired: true
|
||||||
|
videoId: 0QeGbZNS_bY
|
||||||
---
|
---
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
@ -41,7 +41,6 @@ function getSchemaForLang(lang) {
|
|||||||
),
|
),
|
||||||
guideUrl: Joi.string().uri({ scheme: 'https' }),
|
guideUrl: Joi.string().uri({ scheme: 'https' }),
|
||||||
videoUrl: Joi.string().allow(''),
|
videoUrl: Joi.string().allow(''),
|
||||||
videoId: Joi.string(),
|
|
||||||
forumTopicId: Joi.number(),
|
forumTopicId: Joi.number(),
|
||||||
helpRoom: Joi.string(),
|
helpRoom: Joi.string(),
|
||||||
id: Joi.objectId().required(),
|
id: Joi.objectId().required(),
|
||||||
@ -54,6 +53,10 @@ function getSchemaForLang(lang) {
|
|||||||
name: Joi.string(),
|
name: Joi.string(),
|
||||||
order: Joi.number(),
|
order: Joi.number(),
|
||||||
// video challenges only:
|
// video challenges only:
|
||||||
|
videoId: Joi.when('challengeType', {
|
||||||
|
is: challengeTypes.video,
|
||||||
|
then: Joi.string().required()
|
||||||
|
}),
|
||||||
question: Joi.object().keys({
|
question: Joi.object().keys({
|
||||||
text: Joi.string().required(),
|
text: Joi.string().required(),
|
||||||
answers: Joi.array()
|
answers: Joi.array()
|
||||||
|
Reference in New Issue
Block a user