diff --git a/server/config.ts b/server/config.ts index 5b0ae1055..30c9db69c 100755 --- a/server/config.ts +++ b/server/config.ts @@ -97,6 +97,15 @@ export default { agent: new AgentConfig(Number(get('COMMUNITY_ACCOMMODATION_API_TIMEOUT_RESPONSE', 10000))), serviceName: 'temporary-accommodation', }, + approvedPremisesReports: { + url: get('APPROVED_PREMISES_API_URL', 'http://localhost:9092', requiredInProduction), + timeout: { + response: 50000, + deadline: 50000, + }, + agent: new AgentConfig(Number(get('COMMUNITY_ACCOMMODATION_API_TIMEOUT_RESPONSE', 40000))), + serviceName: 'temporary-accommodation', + }, audit: { region: get('AUDIT_SQS_REGION', 'eu-west-2'), queueUrl: get('AUDIT_SQS_QUEUE_URL', ''), diff --git a/server/data/reportClient.test.ts b/server/data/reportClient.test.ts index 94233beff..6fa48fdfe 100644 --- a/server/data/reportClient.test.ts +++ b/server/data/reportClient.test.ts @@ -15,8 +15,8 @@ describe('ReportClient', () => { const callConfig = { token: 'some-token' } as CallConfig beforeEach(() => { - config.apis.approvedPremises.url = 'http://localhost:8080' - fakeApprovedPremisesApi = nock(config.apis.approvedPremises.url) + config.apis.approvedPremisesReports.url = 'http://localhost:8080' + fakeApprovedPremisesApi = nock(config.apis.approvedPremisesReports.url) reportClient = new ReportClient(callConfig) }) diff --git a/server/data/reportClient.ts b/server/data/reportClient.ts index 0155a0ace..2fdaf56a5 100644 --- a/server/data/reportClient.ts +++ b/server/data/reportClient.ts @@ -9,7 +9,7 @@ export default class ReportClient { restClient: RestClient constructor(callConfig: CallConfig) { - this.restClient = new RestClient('personClient', config.apis.approvedPremises as ApiConfig, callConfig) + this.restClient = new RestClient('personClient', config.apis.approvedPremisesReports as ApiConfig, callConfig) } async bookings(response: Response, filename: string, month: string, year: string): Promise {