-
Notifications
You must be signed in to change notification settings - Fork 56
Release to support Connect 2.4.5 #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d of `productTemplateId` in milestoneTemplates topcoder-platform#161 Move all supporting entities endpoints under `/v4/projects/metadata`
…nto dev-milestone-6
- support productTemplate as reference and id of the actual productTemplate as referenceId - create a new endpoint which returns all the metadata as GET /v4/projects/metadata
- New authorization scheme for project creation endpoint topcoder-platform#171 - Profiling of project service methods topcoder-platform#157
@vikasrohit @gondzo |
Thanks @ngoctay. Is it possible for you to create separate PRs for different issues? Actually, single PR makes things complicated when merging them because it would introduce all changes at once and also makes reverting of one particular fix if there is a problem with that. |
src/events/busApi.js
Outdated
projectUrl: connectProjectUrl(project.id), | ||
timelineId: req.timeline.id, | ||
timelineName: req.timeline.name, | ||
milestoneId: updated.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ngoctay @gondzo would it be better to send the original
and updated
milestone objects instead of sending specific fields of milestones? Rationale is that whoever is subscribing for these events, would be interested in knowing what were the previous and current values of milestone' status so that they can behave differently for different combinations of original vs updated values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap, I will update to send the original
and updated
milestone
src/middlewares/userIdAuth.js
Outdated
|
||
req.log.debug('Get m2m token'); | ||
|
||
m2m.getMachineToken(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_SECRET) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please move it to utils.js
? May be for now create a separate function than getSystemUserToken
because that method is being used by some other api calls as well which might fail with m2m in absence of appropriate scope. So, for now a separate function would refactor the code to its desired place, and we can merge the two methods later as separate commit and validate its after effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to make util function for:
- Get m2m token? or
- Get m2m token and make call to identity endpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helper method just to get the m2m token.
@vikasrohit It's hard for me to separate it into single ones now. Will make separate branch and PR in the future. |
- Move the code to get M2M token to util.js#getM2MToken()
src/util.js
Outdated
} | ||
return null; | ||
}); | ||
return httpClient.get(`${config.identityServiceEndpoint}users`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ngoctay why we need this change? I think the old way of getting the details of a particular user should work as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vikasrohit
I tried the old way, but it always returns 404. So I changed like that, and it works.
Could you please double check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ngoctay I just checked it is working for me in dev. Please restore it to the old way, I would take care of it after merging if it does not work.
#172 #171 #169 #168 #163 #161 #151 #157