mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat: simplify client logic (#46870)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -41,18 +41,25 @@ exports.challengeTypes = {
|
||||
multifileCertProject
|
||||
};
|
||||
|
||||
exports.isProject = challengeType => {
|
||||
exports.isFinalProject = challengeType => {
|
||||
if (typeof challengeType !== 'number')
|
||||
throw Error('challengeType must be a number');
|
||||
return (
|
||||
challengeType === frontEndProject ||
|
||||
challengeType === backEndProject ||
|
||||
challengeType === jsProject ||
|
||||
challengeType === pythonProject ||
|
||||
challengeType === codeAllyCert ||
|
||||
challengeType === multifileCertProject
|
||||
);
|
||||
};
|
||||
|
||||
exports.isCodeAllyPractice = challengeType => {
|
||||
if (typeof challengeType !== 'number')
|
||||
throw Error('challengeType must be a number');
|
||||
return challengeType === codeAllyPractice;
|
||||
};
|
||||
|
||||
// turn challengeType to file ext
|
||||
exports.pathsMap = {
|
||||
[html]: 'html',
|
||||
|
||||
Reference in New Issue
Block a user