diff --git a/package.json b/package.json index 8e3d3a8..6650596 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .", "test": "npm run lint && npm run jest" }, - "version": "1.2.0", + "version": "1.2.1", "dependencies": { "auth0-js": "^6.8.4", "config": "^3.2.0", diff --git a/src/services/challenges.js b/src/services/challenges.js index 7c02078..08b7c42 100644 --- a/src/services/challenges.js +++ b/src/services/challenges.js @@ -453,12 +453,15 @@ class ChallengesService { */ async getChallengeRegistrants(challengeId) { /* If no token provided, resource will return Submitter role only */ - const roleId = this.private.tokenV3 ? await this.getRoleId('Submitter') : ''; - const params = { + const roleId = this.private.tokenV3 ? await this.getRoleId('Submitter') : null; + let params = { challengeId, - roleId, }; + if (roleId) { + params = { ...params, roleId }; + } + let registrants = await this.private.apiV5.get(`/resources?${qs.stringify(params)}`) .then(checkErrorV5).then(res => res.result);