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:
committed by
mrugesh mohapatra
parent
156ea1af76
commit
f916204ba5
@@ -18,10 +18,10 @@ export default function userServices() {
|
||||
cb) {
|
||||
const queryUser = req.user;
|
||||
const source = queryUser && Observable.forkJoin(
|
||||
queryUser.getChallengeMap$(),
|
||||
queryUser.getCompletedChallenges$(),
|
||||
queryUser.getPoints$(),
|
||||
(challengeMap, progressTimestamps) => ({
|
||||
challengeMap,
|
||||
(completedChallenges, progressTimestamps) => ({
|
||||
completedChallenges,
|
||||
progress: getProgress(progressTimestamps, queryUser.timezone)
|
||||
})
|
||||
);
|
||||
@@ -29,10 +29,10 @@ export default function userServices() {
|
||||
() => !queryUser,
|
||||
Observable.of({}),
|
||||
Observable.defer(() => source)
|
||||
.map(({ challengeMap, progress }) => ({
|
||||
.map(({ completedChallenges, progress }) => ({
|
||||
...queryUser.toJSON(),
|
||||
...progress,
|
||||
challengeMap
|
||||
completedChallenges
|
||||
}))
|
||||
.map(
|
||||
user => ({
|
||||
@@ -41,7 +41,7 @@ export default function userServices() {
|
||||
[user.username]: {
|
||||
..._.pick(user, userPropsForSession),
|
||||
isEmailVerified: !!user.emailVerified,
|
||||
isGithub: !!user.githubURL,
|
||||
isGithub: !!user.githubProfile,
|
||||
isLinkedIn: !!user.linkedIn,
|
||||
isTwitter: !!user.twitter,
|
||||
isWebsite: !!user.website,
|
||||
|
Reference in New Issue
Block a user