We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc9c361 commit 7fd71fcCopy full SHA for 7fd71fc
src/services/challenges.js
@@ -453,12 +453,15 @@ class ChallengesService {
453
*/
454
async getChallengeRegistrants(challengeId) {
455
/* If no token provided, resource will return Submitter role only */
456
- const roleId = this.private.tokenV3 ? await this.getRoleId('Submitter') : '';
457
- const params = {
+ const roleId = this.private.tokenV3 ? await this.getRoleId('Submitter') : null;
+ let params = {
458
challengeId,
459
- roleId,
460
};
461
+ if (roleId) {
462
+ params = { ...params, roleId };
463
+ }
464
+
465
let registrants = await this.private.apiV5.get(`/resources?${qs.stringify(params)}`)
466
.then(checkErrorV5).then(res => res.result);
467
0 commit comments