Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: topcoder-platform/topcoder-react-lib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: develop
Choose a base ref
...
head repository: topcoder-platform/topcoder-react-lib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: i-v5-develop-25Aug
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 10 commits
  • 1 file changed
  • 4 contributors

Commits on Aug 12, 2020

  1. fix(members-service): fetch only active challenges

    At the `getUserResources` function, it will fetch only Active challenges.
    
    Reference topcoder-platform/community-app#4714
    cagdas001 committed Aug 12, 2020
    Copy the full SHA
    b07363e View commit details

Commits on Aug 13, 2020

  1. Merge pull request #220 from cagdas001/integration-v5-challenge-api

    fix(members-service): fetch only active challenges
    sushilshinde authored Aug 13, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f4992bf View commit details
  2. fix: for #4714

    sushilshinde authored Aug 13, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1f69bae View commit details

Commits on Aug 14, 2020

  1. Copy the full SHA
    7cca2af View commit details
  2. Merge pull request #222 from topcoder-platform/issue-4749

    Fix challenge.track validation
    mtwomey authored Aug 14, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c167da6 View commit details

Commits on Aug 18, 2020

  1. Copy the full SHA
    0077211 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    70643c3 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    50baf8a View commit details
  4. ci: sync with develop

    sushilshinde authored Aug 18, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f81a302 View commit details

Commits on Aug 25, 2020

  1. Copy the full SHA
    d790ef0 View commit details
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/services/members.js
8 changes: 5 additions & 3 deletions src/services/members.js
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
/* global XMLHttpRequest */
import _ from 'lodash';
import qs from 'qs';
import { decodeToken } from 'tc-accounts';
import logger from '../utils/logger';
import { getApiResponsePayload } from '../utils/tc';
import { getApi } from './api';
@@ -329,7 +330,8 @@ class MembersService {
* @param {Array} challengeId the challenge id
*/
async getChallengeResources(challengeId) {
const url = `/resources?challengeId=${challengeId}`;
const user = decodeToken(this.private.tokenV3);
const url = `/resources?challengeId=${challengeId}&memberId=${user.userId}`;
let res = null;

try {
@@ -346,14 +348,14 @@ class MembersService {
* @param {Array} memberId the member id
*/
async getUserResources(memberId) {
const url = `/resources/${memberId}/challenges`;
const url = `/challenges?status=Active&memberId=${memberId}`;
const res = await this.private.apiV5.get(url);
const challenges = await res.json();
const roles = await this.getResourceRoles();
const calls = [];

challenges.forEach(async (ch) => {
calls.push(this.getChallengeResources(ch));
calls.push(this.getChallengeResources(ch.id));
});

return Promise.all(calls).then((resources) => {