Merge pull request #278 from FreeCodeCamp/accessability
Fix some bugs, improver perf of show all bonfires/challenges and add buttons to challenge views
This commit is contained in:
@@ -11,9 +11,12 @@ var _ = require('lodash'),
|
||||
*/
|
||||
|
||||
exports.showAllCoursewares = function(req, res) {
|
||||
var completedCoursewares = req.user.completedCoursewares.map(function(elem) {
|
||||
return elem._id;
|
||||
});
|
||||
var completedList = [];
|
||||
if(req.user) {
|
||||
completedList = req.user.completedList.map(function (elem) {
|
||||
return elem._id;
|
||||
});
|
||||
}
|
||||
|
||||
var noDuplicatedCoursewares = R.uniq(completedCoursewares);
|
||||
var data = {};
|
||||
|
Reference in New Issue
Block a user