mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-25 23:02:05 -04:00
feat: convert RWD cert projects (#44564)
* feat: convert RWD cert projects * feat: convert original projects * fix: add usesMultiFileEditor to meta * feat: add cypress tests for saving and loading to/from database * fix: broken cypress tests * fix: inconsistent variable naming * fix: missed variable name * fix: more cypress * feat: add solutions for english * fix: ctrl+s to database only if signed in * fix: prioritize code from db * refactor: expand the comments slightly
This commit is contained in:
@@ -91,7 +91,7 @@ const jsCertProjectIds = [
|
||||
'aa2e6f85cab2ab736c9a9b24'
|
||||
];
|
||||
|
||||
const multiFileCertProjectIds = getChallenges()
|
||||
const multifileCertProjectIds = getChallenges()
|
||||
.filter(challenge => challenge.challengeType === 14)
|
||||
.map(challenge => challenge.id);
|
||||
|
||||
@@ -132,7 +132,7 @@ export function buildUserUpdate(
|
||||
let completedChallenge = {};
|
||||
if (
|
||||
jsCertProjectIds.includes(challengeId) ||
|
||||
multiFileCertProjectIds.includes(challengeId)
|
||||
multifileCertProjectIds.includes(challengeId)
|
||||
) {
|
||||
completedChallenge = {
|
||||
..._completedChallenge,
|
||||
@@ -315,7 +315,7 @@ export function modernChallengeCompleted(req, res, next) {
|
||||
// step or normal challenge we can avoid storing in the database.
|
||||
if (
|
||||
jsCertProjectIds.includes(id) ||
|
||||
multiFileCertProjectIds.includes(id)
|
||||
multifileCertProjectIds.includes(id)
|
||||
) {
|
||||
completedChallenge.challengeType = challengeType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user