diff --git a/config/default.js b/config/default.js index eeddc18..4a1844b 100644 --- a/config/default.js +++ b/config/default.js @@ -51,6 +51,7 @@ module.exports = { V5_RESOURCES_API_URL: process.env.V5_RESOURCES_API_URL || 'http://localhost:4000/v5/resources', V5_TERMS_API_URL: process.env.V5_TERMS_API_URL || 'http://localhost:4000/v5/terms', V5_RESOURCE_ROLES_API_URL: process.env.V5_RESOURCE_ROLES_API_URL || 'http://localhost:4000/v5/resource-roles', + MEMBER_API_URL: process.env.MEMBER_API_URL || 'https://api.topcoder-dev.com/v5/members', V5_CHALLENGE_TYPE_API_URL: process.env.V5_CHALLENGE_TYPE_API_URL || 'http://localhost:4000/v5/challenge-types', V4_CHALLENGE_TYPE_API_URL: process.env.V4_CHALLENGE_TYPE_API_URL || 'http://localhost:4000/v4/challenge-types', @@ -60,7 +61,6 @@ module.exports = { V5_PROJECTS_API_URL: process.env.V5_PROJECTS_API_URL || 'https://api.topcoder-dev.com/v5/projects', V5_CHALLENGE_MIGRATION_API_URL: process.env.V5_CHALLENGE_MIGRATION_API_URL || 'https://api.topcoder-dev.com/v5/challenge-migration', V4_ES_FEEDER_API_URL: process.env.V4_ES_FEEDER_API_URL || 'https://api.topcoder-dev.com/v4/esfeeder/challenges', - MEMBER_API_URL: process.env.MEMBER_API_URL || 'https://api.topcoder-dev.com/v5/members', V5_GROUPS_API_URL: process.env.V5_GROUPS_API_URL || 'https://api.topcoder-dev.com/v5/groups', diff --git a/src/services/ProcessorService.js b/src/services/ProcessorService.js index 6daa0b9..c4e0d54 100644 --- a/src/services/ProcessorService.js +++ b/src/services/ProcessorService.js @@ -657,7 +657,7 @@ async function processMessage (message) { try { metaValue = constants.supportedMetadata[metadataKey].method(message.payload, constants.supportedMetadata[metadataKey].defaultValue) if (metaValue !== null && metaValue !== '') { - // logger.info(`Setting ${constants.supportedMetadata[metadataKey].description} to ${metaValue}`) + logger.info(`Setting ${constants.supportedMetadata[metadataKey].description} to ${metaValue}`) await metadataService.createOrUpdateMetadata(legacyId, metadataKey, metaValue, updatedByUserId) } } catch (e) { @@ -668,7 +668,7 @@ async function processMessage (message) { await updateMemberPayments(legacyId, message.payload.prizeSets, updatedByUserId) await associateChallengeGroups(message.payload.groups, legacyId, m2mToken) await associateChallengeTerms(message.payload.terms, legacyId, createdByUserId, updatedByUserId) - await setCopilotPayment(message.payload.id, legacyId, _.get(message, 'payload.prizeSets'), createdByUserId, updatedByUserId, m2mToken) + await setCopilotPayment(challengeUuid, legacyId, _.get(message, 'payload.prizeSets'), createdByUserId, updatedByUserId, m2mToken) if (message.payload.status && challenge) { // logger.info(`The status has changed from ${challenge.currentStatus} to ${message.payload.status}`) @@ -677,7 +677,7 @@ async function processMessage (message) { const activated = await activateChallenge(legacyId) logger.info(`Activated! ${JSON.stringify(activated)}`) // Repost all challenge resource on Kafka so they will get created on legacy by the legacy-challenge-resource-processor - await rePostResourcesOnKafka(message.payload.id, m2mToken) + await rePostResourcesOnKafka(challengeUuid, m2mToken) } if (message.payload.status === constants.challengeStatuses.Completed && challenge.currentStatus !== constants.challengeStatuses.Completed) { if (message.payload.task.isTask) {