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

Commit 1c7a1bd

Browse files
author
sachin-maheshwari
authored
Merge pull request #16 from topcoder-platform/develop
Shapeup#4 CQRS standards update
2 parents e8154eb + 3b6217b commit 1c7a1bd

File tree

2 files changed

+5
-34
lines changed

2 files changed

+5
-34
lines changed

src/common/helper.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -119,33 +119,6 @@ async function getAttributes (token) {
119119
}
120120
}
121121

122-
/**
123-
* Get all skills
124-
* * Unused for now. Retained for any future use
125-
* @param {String} token
126-
* @returns a map (name -> id)
127-
*/
128-
async function getSkillProviderId (token) {
129-
const res = await axios.get(`${config.UBAHN_API_URL}/skillsProviders`, { headers: { Authorization: `Bearer ${token}` }, params: { name: config.SKILL_PROVIDER_NAME } })
130-
if (res.data && res.data.length > 0) {
131-
return res.data[0].id
132-
}
133-
}
134-
135-
/**
136-
* Get the skillId
137-
* * Unused for now. Retained for any future use
138-
* @param {String} skillProviderId
139-
* @param {String} name
140-
* @param {String} token
141-
*/
142-
async function getSkillId (skillProviderId, name, token) {
143-
const res = await axios.get(`${config.UBAHN_API_URL}/skills`, { headers: { Authorization: `Bearer ${token}` }, params: { skillProviderId, name } })
144-
if (res.data && res.data.length > 0) {
145-
return res.data[0].id
146-
}
147-
}
148-
149122
/**
150123
* Returns the member location for the member handle
151124
* * Unused for now. Retained for any future use
@@ -253,8 +226,6 @@ module.exports = {
253226
getTopcoderToken,
254227
getOrganizationId,
255228
getAttributes,
256-
getSkillProviderId,
257-
getSkillId,
258229
getMemberLocation,
259230
getMemberSkills,
260231
createUser,

src/services/ProcessorService.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,22 @@ async function processCreate (message, ubahnToken) {
6565
isInactive: !message.payload.active
6666
}, ubahnToken)
6767
logger.info(`external profile: ${organizationId} created`)
68-
await helper.sleep()
68+
//await helper.sleep()
6969
await helper.createUserAttribute(userId, _.get(attributes, 'isAvailable'), message.payload.active.toString(), ubahnToken)
7070
logger.info('user attribute: isAvailable created')
71-
await helper.sleep()
71+
//await helper.sleep()
7272
await helper.createUserAttribute(userId, _.get(attributes, 'company'), 'Topcoder', ubahnToken)
7373
logger.info('user attribute: company created')
74-
await helper.sleep()
74+
//await helper.sleep()
7575
await helper.createUserAttribute(userId, _.get(attributes, 'title'), 'Member', ubahnToken)
7676
logger.info('user attribute: title created')
77-
await helper.sleep()
77+
//await helper.sleep()
7878
await helper.createUserAttribute(userId, _.get(attributes, 'location'), location, ubahnToken)
7979
logger.info('user attribute: location created')
8080

8181
// Custom attribute. May or may not exist
8282
if (_.get(attributes, 'email')) {
83-
helper.sleep()
83+
//helper.sleep()
8484
await helper.createUserAttribute(userId, _.get(attributes, 'email'), message.payload.email, ubahnToken)
8585
logger.info('user attribute: email created')
8686
}

0 commit comments

Comments
 (0)