Chore: Update User model (#17171)

* fix(logs): Remove console.log's

* chore(challengeMap): challengeMap -> completedChallenges

* chore(userModel): Update user model

* feat(userIDs): Add user ident fields

* chore(github): Remove more refs to github data
This commit is contained in:
Stuart Taylor
2018-05-15 14:56:26 +01:00
committed by mrugesh mohapatra
parent 156ea1af76
commit f916204ba5
23 changed files with 233 additions and 742 deletions

View File

@@ -23,11 +23,11 @@ export default function settingsController(app) {
);
};
function refetchChallengeMap(req, res, next) {
function refetchCompletedChallenges(req, res, next) {
const { user } = req;
return user.requestChallengeMap()
return user.requestCompletedChallenges()
.subscribe(
challengeMap => res.json({ challengeMap }),
completedChallenges => res.json({ completedChallenges }),
next
);
}
@@ -136,9 +136,9 @@ export default function settingsController(app) {
}
api.post(
'/refetch-user-challenge-map',
'/refetch-user-completed-challenges',
ifNoUser401,
refetchChallengeMap
refetchCompletedChallenges
);
api.post(
'/update-flags',