Skip to content

Commit 7fd71fc

Browse files
committed
feat(unassigned-tasks) : initial fixes
1 parent cc9c361 commit 7fd71fc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/services/challenges.js

+6-3
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)