From 035c50cbeef88b55581e2a16268c121725e19368 Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Wed, 9 Oct 2019 12:34:38 +0530 Subject: [PATCH 1/2] added funciton to fetch the registrants --- src/services/challenges.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/services/challenges.js b/src/services/challenges.js index bef238fc..58a98e87 100644 --- a/src/services/challenges.js +++ b/src/services/challenges.js @@ -385,6 +385,17 @@ class ChallengesService { return finalChallenge; } + /** + * Gets challenge registrants from Topcoder API. + * @param {Number|String} challengeId + * @return {Promise} Resolves to the challenge registrants array. + */ + async getChallengeRegistrants(challengeId) { + const challenge = await this.private.api.get(`/challenges/${challengeId}`) + .then(checkError).then(res => res.content); + return challenge.registrants; + } + /** * Gets possible challenge subtracks. * @return {Promise} Resolves to the array of subtrack names. From 27001a9a4f59a4f7615be2d7c5eda29ff3bf0166 Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Wed, 9 Oct 2019 12:35:26 +0530 Subject: [PATCH 2/2] updated npm version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93cac4e9..3cb777eb 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": "0.8.1", + "version": "0.8.2", "dependencies": { "auth0-js": "^6.8.4", "config": "^3.2.0",