Skip to content

Commit d19c4b6

Browse files
committed
Fix up invitation by email
1 parent 5c0bda9 commit d19c4b6

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

config/development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"connectProjectsUrl": "https://connect.topcoder-dev.com/projects/",
66
"fileServiceEndpoint": "https://api.topcoder-dev.com/v5/files",
77
"memberServiceEndpoint": "https://api.topcoder-dev.com/v5/members",
8-
"identityServiceEndpoint": "https://api.topcoder-dev.com/v3/",
8+
"identityServiceEndpoint": "https://api.topcoder-dev.com/v5/",
99
"taasJobApiUrl": "https://api.topcoder-dev.com/v5/jobs",
1010
"sfdcBillingAccountNameField": "Billing_Account_Name__c",
1111
"sfdcBillingAccountMarkupField": "Mark_Up__c",

package-lock.json

Lines changed: 13 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/routes/projectMemberInvites/create.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,13 @@ module.exports = [
294294
// whom we are inviting, because Member Service has a loose search logic and may return
295295
// users with handles whom we didn't search for
296296
.then((foundUsers) => {
297-
const lowerCaseHandles = invite.handles.map(handle => handle.toLowerCase());
298-
return foundUsers.filter(foundUser => _.includes(lowerCaseHandles, foundUser.handleLower));
297+
if(invite.handles) {
298+
const lowerCaseHandles = invite.handles.map(handle => handle.toLowerCase());
299+
return foundUsers.filter(foundUser => _.includes(lowerCaseHandles, foundUser.handleLower));
300+
}
301+
else {
302+
return []
303+
}
299304
})
300305
.then((inviteUsers) => {
301306
const members = req.context.currentProjectMembers;
@@ -436,6 +441,7 @@ module.exports = [
436441
}
437442
});
438443
}).catch((err) => {
444+
console.log(err)
439445
if (failed.length) {
440446
res.status(403).json(_.assign({}, { success: [] }, { failed }));
441447
} else next(err);

src/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ const projectServiceUtils = {
559559
}
560560
try {
561561
const token = yield this.getM2MToken();
562+
console.log(`TOKEN: ${token}`)
562563
const httpClient = this.getHttpClient({ id: requestId, log: logger });
563564
if (logger) {
564565
logger.trace(handles);

0 commit comments

Comments
 (0)