fix: make github url optional for backend projects (#37936)
This commit is contained in:
@ -261,11 +261,7 @@ function projectCompleted(req, res, next) {
|
|||||||
]);
|
]);
|
||||||
completedChallenge.completedDate = Date.now();
|
completedChallenge.completedDate = Date.now();
|
||||||
|
|
||||||
if (
|
if (!completedChallenge.solution) {
|
||||||
!completedChallenge.solution ||
|
|
||||||
// only basejumps require github links
|
|
||||||
(completedChallenge.challengeType === 4 && !completedChallenge.githubLink)
|
|
||||||
) {
|
|
||||||
return res.status(403).json({
|
return res.status(403).json({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message:
|
message:
|
||||||
|
@ -18,7 +18,7 @@ const options = {
|
|||||||
solution: 'url',
|
solution: 'url',
|
||||||
githubLink: 'url'
|
githubLink: 'url'
|
||||||
},
|
},
|
||||||
required: ['solution', 'githubLink']
|
required: ['solution']
|
||||||
};
|
};
|
||||||
|
|
||||||
export class ProjectForm extends Component {
|
export class ProjectForm extends Component {
|
||||||
|
Reference in New Issue
Block a user