Skip to content

Commit 502cc55

Browse files
authored
Merge pull request #793 from topcoder-platform/PM-973_decomision-connect
PM-973 decomision connect
2 parents 5b08d74 + ef41df6 commit 502cc55

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

config/custom-environment-variables.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"whitelistedOriginsForUserIdAuth": "WHITELISTED_ORIGINS_FOR_USERID_AUTH",
5252
"AUTH0_PROXY_SERVER_URL" : "AUTH0_PROXY_SERVER_URL",
5353
"connectUrl": "CONNECT_URL",
54+
"workManagerUrl": "WORK_MANAGER_URL",
5455
"accountsAppUrl": "ACCOUNTS_APP_URL",
5556
"inviteEmailSubject": "INVITE_EMAIL_SUBJECT",
5657
"inviteEmailSectionTitle": "INVITE_EMAIL_SECTION_TITLE",

config/default.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"customerPaymentIndexName": "customer_payments",
3030
"customerPaymentDocType": "doc"
3131
},
32-
"connectProjectUrl": "",
3332
"dbConfig": {
3433
"masterUrl": "postgres://coder:mysecretpassword@localhost:5432/projectsdb",
3534
"maxPoolSize": 50,
@@ -40,8 +39,8 @@
4039
"url": "localhost:9092"
4140
},
4241
"analyticsKey": "",
43-
"VALID_ISSUERS": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\",\"https:\/\/topcoder-dev.auth0.com\/\"]",
44-
"validIssuers": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\",\"https:\/\/topcoder-dev.auth0.com\/\"]",
42+
"VALID_ISSUERS": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\",\"https:\/\/topcoder-dev.auth0.com\/\", \"https:\/\/auth.topcoder-dev.com\/\"]",
43+
"validIssuers": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\",\"https:\/\/topcoder-dev.auth0.com\/\", \"https:\/\/auth.topcoder-dev.com\/\"]",
4544
"jwksUri": "",
4645
"busApiUrl": "http://api.topcoder-dev.com/v5",
4746
"messageApiUrl": "http://api.topcoder-dev.com/v5",
@@ -54,7 +53,7 @@
5453
"EMAIL_INVITE_FROM_EMAIL": "[email protected]",
5554
"inviteEmailSubject": "You are invited to Topcoder",
5655
"inviteEmailSectionTitle": "Project Invitation",
57-
"connectUrl": "https://connect.topcoder-dev.com",
56+
"workManagerUrl": "https://challenges.topcoder-dev.com",
5857
"accountsAppUrl": "https://accounts.topcoder-dev.com",
5958
"MAX_REVISION_NUMBER": 100,
6059
"UNIQUE_GMAIL_VALIDATION": false,
@@ -87,4 +86,4 @@
8786
},
8887
"STRIPE_SECRET_KEY": "",
8988
"sfdcBillingAccountNameField": "Billing_Account_name__c"
90-
}
89+
}

config/development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"pubsubQueueName": "dev.project.service",
33
"pubsubExchangeName": "dev.projects",
44
"attachmentsS3Bucket": "topcoder-dev-media",
5-
"connectProjectsUrl": "https://connect.topcoder-dev.com/projects/",
5+
"workManagerUrl": "https://challenges.topcoder-dev.com/",
66
"fileServiceEndpoint": "https://api.topcoder-dev.com/v5/files",
77
"memberServiceEndpoint": "https://api.topcoder-dev.com/v5/members",
88
"identityServiceEndpoint": "https://api.topcoder-dev.com/v3/",

config/production.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"authDomain": "topcoder.com",
3-
"connectProjectsUrl": "https://connect.topcoder.com/projects/",
3+
"workManagerUrl": "https://challenges.topcoder.com/",
44
"sfdcBillingAccountNameField": "Billing_Account_name__c",
55
"sfdcBillingAccountMarkupField": "Mark_up__c",
66
"sfdcBillingAccountActiveField": "Active__c"

src/events/busApi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const mapEventTypes = {
3838
* @returns {string} the connect project attachment url
3939
*/
4040
function connectProjectAttachmentUrl(projectId, attachmentId) {
41-
return `${config.get('connectProjectsUrl')}${projectId}/attachments/${attachmentId}`;
41+
return `${config.get('workManagerUrl')}projects/${projectId}/attachments/${attachmentId}`;
4242
}
4343

4444
/**
@@ -48,7 +48,7 @@ function connectProjectAttachmentUrl(projectId, attachmentId) {
4848
* @returns {string} the connect project url
4949
*/
5050
function connectProjectUrl(projectId) {
51-
return `${config.get('connectProjectsUrl')}${projectId}`;
51+
return `${config.get('workManagerUrl')}projects/${projectId}`;
5252
}
5353

5454
module.exports = (app, logger) => {

src/events/timelines/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const eClient = util.getElasticSearchClient();
2121
* @param {string|number} projectId the project id
2222
* @returns {string} the connect project url
2323
*/
24-
function connectProjectUrl(projectId) {
25-
return `${config.get('connectProjectsUrl')}${projectId}`;
24+
function wmProjectUrl(projectId) {
25+
return `${config.get('workManagerUrl')}projects/${projectId}`;
2626
}
2727

2828
/**
@@ -169,7 +169,7 @@ async function timelineAdjustedKafkaHandler(app, topic, payload) {
169169
createEvent(BUS_API_EVENT.PROJECT_PLAN_UPDATED, {
170170
projectId: project.id,
171171
projectName: project.name,
172-
projectUrl: connectProjectUrl(project.id),
172+
projectUrl: wmProjectUrl(project.id),
173173
userId: payload.userId,
174174
initiatorUserId: payload.userId,
175175
}, app.logger);

src/routes/projectMemberInvites/create.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ const buildCreateInvitePromises = (req, inviteEmails, inviteUserIds, invites, da
199199
};
200200

201201
const sendInviteEmail = (req, projectId, invite) => {
202-
req.log.debug(`Sending invite email: ${JSON.stringify(req)}, ${projectId}, ${JSON.stringify(invite)}`)
202+
req.log.debug(`Sending invite email: ${JSON.stringify(req.body)}, ${projectId}, ${JSON.stringify(invite)}`)
203203
req.log.debug(req.authUser);
204204
const emailEventType = CONNECT_NOTIFICATION_EVENT.PROJECT_MEMBER_EMAIL_INVITE_CREATED;
205205
const promises = [
@@ -219,7 +219,7 @@ const sendInviteEmail = (req, projectId, invite) => {
219219
};
220220
createEvent(emailEventType, {
221221
data: {
222-
connectURL: config.get('connectUrl'),
222+
workManagerUrl: config.get('workManagerUrl'),
223223
accountsAppURL: config.get('accountsAppUrl'),
224224
subject: config.get('inviteEmailSubject'),
225225
projects: [{

0 commit comments

Comments
 (0)