Change:
<!-- FreeCodeCamp Issue Template --<!-- Please provide as much detail as possible for us to fix your issue --<!-- Remove any heading sections you did not fill out --<!-- Insert link to challenge below --<!-- Describe below when the issue happens and how to reproduce it --<!-- Describe your workspace in which you are having issues--Browser Name, Version: Operating System: Mobile, Desktop, or Tablet: <!-- If relevant, paste all of your challenge code in here --<!-- Add a screenshot of your issue --

Discussion:
var isCompletedDate =  Math.round(+new Date() / 1000); var bonfireHash = req.body.bonfireInfo.bonfireHash; var isSolution = req.body.bonfireInfo.solution; <del> // TODO debug(isCompletedWith, 'Is completed with'); </del> if (isCompletedWith) { var paired = User.find({"profile.username": isCompletedWith}).limit(1);

throw err; } if (user && paired) { <del> res.redirect('/bonfires'); </del> <ins> res.send(true); </ins> } }) }); } }) } else { req.user.completedBonfires.push({ _id: bonfireHash, completedWith: null,

}) var index = req.user.uncompletedBonfires.indexOf(bonfireHash); if (index > -1) { req.user.uncompletedBonfires.splice(index,1) } req.user.save(function(err, user) { if (err) { throw err; } if (user) { <del> res.redirect('/bonfires'); </del> <ins> debug('Saving user'); res.send(true) </ins> } }); } }); // Unique Check API route

return res.redirect('bonfires/meet-bonfire'); } var currentTime = parseInt(+new Date() / 1000); <del> if (currentTime - req.user.lastContentSync > 86400) { </del> <ins> if (currentTime - req.user.lastContentSync > 10) { </ins> req.user.lastContentSync = currentTime; var completed = req.user.completedBonfires.map(function (elem) { return elem._id;

} } }); <del> } if (allTestsPassed) { allTestsPassed = false; showCompletion(); </del> <ins> if (allTestsPassed) { allTestsPassed = false; showCompletion(); } </ins> } };

$('#complete-bonfire-dialog').modal('show'); // Only post to server if there is an authenticated user if ($('.signup-btn-nav').length < 1) { <del> $.ajax({ type: 'POST', data: { </del> <ins> $.post( '/completed-bonfire', { </ins> bonfireInfo: { completedWith : didCompleteWith, solution: bonfireSolution, bonfireHash: thisBonfireHash } }, <del> url: '/completed-bonfire/' }); </del> <ins> function(res) { if (res) { window.location.href = 'http://localhost:3001/bonfires' } }) </ins> } } <ins> $('.next-bonfire-button').on('click', function() { var bonfireSolution = myCodeMirror.getValue(); var thisBonfireHash = passedBonfireHash || null; var didCompleteWith = $('#completed-with').val() || null; completedBonfire(didCompleteWith, bonfireSolution, thisBonfireHash); }); </ins> $('.all-challenges').on('click', function() { $('#all-challenges-dialog').modal('show'); });

}); <del> $('.next-bonfire-button').on('click', function() { var bonfireSolution = myCodeMirror.getValue(); var thisBonfireHash = passedBonfireHash || null; var didCompleteWith = $('#completed-with').val() || null; completedBonfire(didCompleteWith, bonfireSolution, thisBonfireHash); window.setTimeout(function() { // TODO window.location = '/bonfires'; }, 100); }); </del> // Bonfire instructions functions $('#more-info').on('click', function() {