mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-07 04:00:55 -04:00
feat(api): add multifile python projects to new api (#53931)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
This commit is contained in:
@@ -16,6 +16,10 @@ export const multifileCertProjectIds = getChallenges()
|
||||
.filter(c => c.challengeType === challengeTypes.multifileCertProject)
|
||||
.map(c => c.id);
|
||||
|
||||
export const multifilePythonCertProjectIds = getChallenges()
|
||||
.filter(c => c.challengeType === challengeTypes.multifilePythonCertProject)
|
||||
.map(c => c.id);
|
||||
|
||||
export const msTrophyChallenges = getChallenges()
|
||||
.filter(challenge => challenge.challengeType === challengeTypes.msTrophy)
|
||||
.map(({ id, msTrophyId }) => ({ id, msTrophyId }));
|
||||
@@ -124,7 +128,8 @@ export async function updateUserChallengeData(
|
||||
|
||||
if (
|
||||
jsCertProjectIds.includes(challengeId) ||
|
||||
multifileCertProjectIds.includes(challengeId)
|
||||
multifileCertProjectIds.includes(challengeId) ||
|
||||
multifilePythonCertProjectIds.includes(challengeId)
|
||||
) {
|
||||
completedChallenge = {
|
||||
..._completedChallenge,
|
||||
@@ -186,7 +191,10 @@ export async function updateUserChallengeData(
|
||||
userCompletedChallenges.push(finalChallenge);
|
||||
}
|
||||
|
||||
if (multifileCertProjectIds.includes(challengeId)) {
|
||||
if (
|
||||
multifileCertProjectIds.includes(challengeId) ||
|
||||
multifilePythonCertProjectIds.includes(challengeId)
|
||||
) {
|
||||
const challengeToSave: SavedChallenge = {
|
||||
id: challengeId,
|
||||
lastSavedDate: newProgressTimeStamp,
|
||||
|
||||
Reference in New Issue
Block a user