Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/v1-ready/hubspot/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ const Definition = {
modelName: 'HubSpot',
requiredAuthMethods: {
getToken: async function (api, params) {
const code = get(params.data, 'code');
const code = get(params, 'code');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing backward compatibility fallback for params.data.code. The PR description promises a fallback for older cores but the code doesn't implement it. This will break integrations using older core versions that pass params.data.code.

Fix:

const code = get(params, 'code') || get(params.data, 'code');
Suggested change
const code = get(params, 'code');
const code = get(params, 'code') || get(params.data, 'code');

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

return api.getTokenFromCode(code);
},
getEntityDetails: async function (api, callbackParams, tokenResponse, userId) {
const userDetails = await api.getUserDetails();
return {
identifiers: {externalId: String(userDetails.portalId), userId},
identifiers: {externalId: String(userDetails.portalId), user: userId},
details: {name: userDetails.hub_domain},
}
},
Expand Down
Loading