fix(15): WR-01 use shared getAutotaskClient factory in phishing-detector
This commit is contained in:
parent
ecc34b4bad
commit
c875081275
1 changed files with 1 additions and 14 deletions
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
import { createHash } from 'crypto';
|
||||
import { postgresClient } from './postgres-client';
|
||||
import { AutotaskClient } from './autotask-client';
|
||||
import { getAutotaskClient } from './autotask-factory';
|
||||
|
||||
// =============================================================================
|
||||
// Pure detection logic — pattern matcher + content hash
|
||||
|
|
@ -109,19 +109,6 @@ export interface EvidencePayload {
|
|||
attachments: EvidenceAttachment[];
|
||||
}
|
||||
|
||||
let _autotaskClient: AutotaskClient | null = null;
|
||||
function getAutotaskClient(): AutotaskClient {
|
||||
if (!_autotaskClient) {
|
||||
_autotaskClient = new AutotaskClient({
|
||||
apiUrl: process.env.AUTOTASK_API_URL || '',
|
||||
username: process.env.AUTOTASK_USERNAME || '',
|
||||
password: process.env.AUTOTASK_SECRET || '',
|
||||
apiIntegrationCode: process.env.AUTOTASK_API_INTEGRATION_CODE || '',
|
||||
});
|
||||
}
|
||||
return _autotaskClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gather EVID-01 evidence for a candidate ticket: company name, ticket notes,
|
||||
* time entries, and attachment metadata (never base64 `data` — content fetch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue