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

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