fix: correct environment variable name in sync scheduler

The scheduled sync was using AUTOTASK_INTEGRATION_CODE but the actual
environment variable is AUTOTASK_API_INTEGRATION_CODE. This caused
scheduled syncs to fail with 'IntegrationCode is invalid' while
manual syncs worked fine.

Changed:
- AUTOTASK_INTEGRATION_CODE -> AUTOTASK_API_INTEGRATION_CODE

This aligns the scheduler with autotask-factory.ts which was already
using the correct variable name.
This commit is contained in:
root 2026-02-02 21:13:35 -05:00
parent 9f912aed24
commit 1f9ac476b4

View file

@ -43,7 +43,7 @@ class SyncScheduler {
apiUrl: process.env.AUTOTASK_API_URL || '',
username: process.env.AUTOTASK_USERNAME || '',
password: process.env.AUTOTASK_SECRET || '',
apiIntegrationCode: process.env.AUTOTASK_INTEGRATION_CODE || '',
apiIntegrationCode: process.env.AUTOTASK_API_INTEGRATION_CODE || '',
});
this.syncService = createSyncService(autotaskClient);
}