mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-22 13:00:56 -04:00
Fix bug where users could get points for completing the same challenge.
This commit is contained in:
@@ -258,7 +258,7 @@ exports.completedCourseware = function (req, res, next) {
|
||||
});
|
||||
var index = req.user.completedCoursewares.indexOf(coursewareHash);
|
||||
|
||||
if (index === -1) {
|
||||
if (index > -1) {
|
||||
req.user.progressTimestamps.push(Date.now() || 0);
|
||||
req.user.uncompletedCoursewares.splice(index, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user