Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit d02e1c8

Browse files
committed
Remove hard-coded v3 path for closing challenges.
1 parent 7f3f93e commit d02e1c8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

utils/topcoder-api-helper.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const m2m = m2mAuth(_.pick(config, ['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_
2525

2626
let topcoderApiProjects = require('topcoder-api-projects');
2727
let topcoderApiChallenges = require('@topcoder-platform/topcoder-api-challenges-v4-wrapper');
28-
let topcoderApiChallengesV3 = require('topcoder-api-challenges');
2928

3029
const topcoderDevApiProjects = require('topcoder-dev-api-projects');
3130
const topcoderDevApiChallenges = require('@topcoder-platform/topcoder-api-challenges-v4-wrapper-dev');
@@ -46,7 +45,6 @@ let cachedAccessToken;
4645
// Init the API instances
4746
const projectsClient = topcoderApiProjects.ApiClient.instance;
4847
const challengesClient = topcoderApiChallenges.ApiClient.instance;
49-
const challengesClientV3 = topcoderApiChallengesV3.ApiClient.instance;
5048

5149
// Timeout increase to 5 minutes
5250
challengesClient.timeout = 300000;
@@ -303,9 +301,6 @@ async function closeChallenge(id, winnerId) {
303301
logger.debug(`Closing challenge ${id}`);
304302
try {
305303
let basePath = challengesClient.basePath;
306-
if (!config.TC_DEV_ENV) {
307-
basePath = challengesClientV3.basePath;
308-
}
309304
const response = await axios.post(`${basePath}/challenges/${id}/close?winnerId=${winnerId}`, null, {
310305
headers: {
311306
authorization: `Bearer ${apiKey}`,

0 commit comments

Comments
 (0)