Removed display of users personal checklist on challenge tasks (#9837)

This commit is contained in:
Keith Holliday
2018-01-23 10:55:55 -07:00
committed by GitHub
parent f5d7777b2c
commit 51aebb540c
2 changed files with 16 additions and 3 deletions

View File

@@ -413,7 +413,10 @@ api.getChallengeMemberProgress = {
// manually call toJSON with minimize: true so empty paths aren't returned
let response = member.toJSON({minimize: true});
delete response.challenges;
response.tasks = chalTasks.map(chalTask => chalTask.toJSON({minimize: true}));
response.tasks = chalTasks.map(chalTask => {
chalTask.checklist = []; // Clear checklists as they are private
return chalTask.toJSON({minimize: true});
});
res.respond(200, response);
},
};