Skip to content

Instantly share code, notes, and snippets.

@PatheticMustan
Created December 5, 2025 00:49
Show Gist options
  • Select an option

  • Save PatheticMustan/bebd16aeb3cb771670d8f2f08053873b to your computer and use it in GitHub Desktop.

Select an option

Save PatheticMustan/bebd16aeb3cb771670d8f2f08053873b to your computer and use it in GitHub Desktop.
const blockName = "XXXXXXXXXX"
const module = temp1.map(v => v.challenge).filter(v => v.block === blockName).map(v => v.id);
function complete(challID) {
fetch("https://api.freecodecamp.org/encoded/modern-challenge-completed", {
"headers": {
"content-type": "application/json",
"csrf-token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
},
"body": JSON.stringify({id: challID, challengeType:6}),
"method": "POST",
"mode": "cors",
"credentials": "include"
}).then(v => v.json()).then(v => console.log(v))
}
setInterval(() => {
const nextID = module.shift();
if (nextID) complete(nextID)
}, 1500)
@PatheticMustan
Copy link
Author

temp1 comes from page_data.json, it's result.data.allChallengeNode.nodes.
blockName is the module name like "basic-css"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment