Skip to content

Commit

Permalink
We no longer use the portal env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
brandenrodgers committed Jan 10, 2025
1 parent 2b22bad commit 005f931
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config/__tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ describe('config/config', () => {

beforeEach(() => {
process.env = {
HUBSPOT_PORTAL_ID: `${portalId}`,
HUBSPOT_ACCOUNT_ID: `${portalId}`,
HUBSPOT_CLIENT_ID: clientId,
HUBSPOT_CLIENT_SECRET: clientSecret,
HUBSPOT_REFRESH_TOKEN: refreshToken,
Expand Down Expand Up @@ -499,7 +499,7 @@ describe('config/config', () => {

beforeEach(() => {
process.env = {
HUBSPOT_PORTAL_ID: `${portalId}`,
HUBSPOT_ACCOUNT_ID: `${portalId}`,
HUBSPOT_API_KEY: apiKey,
};
getAndLoadConfigIfNeeded({ useEnv: true });
Expand Down Expand Up @@ -537,7 +537,7 @@ describe('config/config', () => {

beforeEach(() => {
process.env = {
HUBSPOT_PORTAL_ID: `${portalId}`,
HUBSPOT_ACCOUNT_ID: `${portalId}`,
HUBSPOT_PERSONAL_ACCESS_KEY: personalAccessKey,
};
getAndLoadConfigIfNeeded({ useEnv: true });
Expand Down
2 changes: 1 addition & 1 deletion config/config_DEPRECATED.ts
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ function getConfigVariablesFromEnv() {
clientId: env[ENVIRONMENT_VARIABLES.HUBSPOT_CLIENT_ID],
clientSecret: env[ENVIRONMENT_VARIABLES.HUBSPOT_CLIENT_SECRET],
personalAccessKey: env[ENVIRONMENT_VARIABLES.HUBSPOT_PERSONAL_ACCESS_KEY],
portalId: parseInt(env[ENVIRONMENT_VARIABLES.HUBSPOT_PORTAL_ID] || '', 10),
portalId: parseInt(env[ENVIRONMENT_VARIABLES.HUBSPOT_ACCOUNT_ID] || '', 10),
refreshToken: env[ENVIRONMENT_VARIABLES.HUBSPOT_REFRESH_TOKEN],
httpTimeout: env[ENVIRONMENT_VARIABLES.HTTP_TIMEOUT]
? parseInt(env[ENVIRONMENT_VARIABLES.HTTP_TIMEOUT] as string)
Expand Down
1 change: 0 additions & 1 deletion constants/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const ENVIRONMENT_VARIABLES = {
HUBSPOT_CLIENT_SECRET: 'HUBSPOT_CLIENT_SECRET',
HUBSPOT_PERSONAL_ACCESS_KEY: 'HUBSPOT_PERSONAL_ACCESS_KEY',
HUBSPOT_ACCOUNT_ID: 'HUBSPOT_ACCOUNT_ID',
HUBSPOT_PORTAL_ID: 'HUBSPOT_PORTAL_ID',
HUBSPOT_REFRESH_TOKEN: 'HUBSPOT_REFRESH_TOKEN',
HUBSPOT_ENVIRONMENT: 'HUBSPOT_ENVIRONMENT',
HTTP_TIMEOUT: 'HTTP_TIMEOUT',
Expand Down

0 comments on commit 005f931

Please sign in to comment.