Skip to content

Commit beeb40c

Browse files
Merge pull request topcoder-platform#317 from topcoder-platform/develop
Release v1.2.1
2 parents db9b9a9 + d5e1b2b commit beeb40c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
3232
"test": "npm run lint && npm run jest"
3333
},
34-
"version": "1.2.0",
34+
"version": "1.2.1",
3535
"dependencies": {
3636
"auth0-js": "^6.8.4",
3737
"config": "^3.2.0",

src/services/challenges.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,15 @@ class ChallengesService {
453453
*/
454454
async getChallengeRegistrants(challengeId) {
455455
/* If no token provided, resource will return Submitter role only */
456-
const roleId = this.private.tokenV3 ? await this.getRoleId('Submitter') : '';
457-
const params = {
456+
const roleId = this.private.tokenV3 ? await this.getRoleId('Submitter') : null;
457+
let params = {
458458
challengeId,
459-
roleId,
460459
};
461460

461+
if (roleId) {
462+
params = { ...params, roleId };
463+
}
464+
462465
let registrants = await this.private.apiV5.get(`/resources?${qs.stringify(params)}`)
463466
.then(checkErrorV5).then(res => res.result);
464467

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy