Skip to content

Commit 9386505

Browse files
Update Apex url (#3697)
Co-authored-by: mmcallister-cll <[email protected]>
1 parent 6e4a13f commit 9386505

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.changeset/proud-dolphins-walk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@chainlink/apex-adapter': patch
3+
---
4+
5+
Update url

packages/sources/apex/src/config/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const config = new AdapterConfig({
2828
NAV_API_ENDPOINT: {
2929
description: 'An API endpoint for Data Provider',
3030
type: 'string',
31-
default: 'https://api.apexgroup.com/v1/reports/NAV',
31+
default: 'https://api.apexgroup.com/1ASkuiqAPUyZTQqYIK8RlC6G8tWupuC7/v1/reports/NAV',
3232
},
3333
AUTH_API_ENDPOINT: {
3434
description: 'An auth API endpoint for Data Provider',

packages/sources/apex/src/transport/nav.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,14 @@ class NavTransport extends SubscriptionTransport<HttpTransportTypes> {
174174
}
175175

176176
async getNav(accountName: string, token: string): Promise<NavResponseSchema> {
177-
const baseURL = this.settings.NAV_API_ENDPOINT
178-
const headers = {
179-
Authorization: `Bearer ${token}`,
180-
}
181177
const requestConfig = {
182-
baseURL,
183-
headers,
184-
params: {
185-
accountName,
178+
baseURL: this.settings.NAV_API_ENDPOINT,
179+
url: `?accountName=${accountName}`,
180+
headers: {
181+
Authorization: `Bearer ${token}`,
186182
},
187183
}
188-
const a = await this.requester.request(baseURL, requestConfig)
184+
const a = await this.requester.request(JSON.stringify(requestConfig), requestConfig)
189185
if (a.response.status == 401) {
190186
throw new AdapterError({
191187
statusCode: 502,

0 commit comments

Comments
 (0)