Skip to content

Commit

Permalink
Merge pull request #17 from bcgov-nr/fix/brokerApiCall
Browse files Browse the repository at this point in the history
fix: broker api call
  • Loading branch information
mbystedt authored Jul 20, 2023
2 parents 101953d + 7987910 commit f33d1f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const configPath = {

export const brokerApiUrl = {
'broker-api-url': flags.string({
default: 'https://nr-broker.apps.silver.devops.gov.bc.ca/api/',
default: 'https://nr-broker.apps.silver.devops.gov.bc.ca/',
description: 'The broker api base url',
env: 'BROKER_API_URL',
}),
Expand Down
3 changes: 2 additions & 1 deletion src/services/impl/source-broker.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export class SourceBrokerService implements SourceService {
return Promise.resolve([]);
}
const response: UpstreamResponseDto[] =
(await axios.get(
(await axios.post(
`${this.brokerApiUrl}v1/graph/vertex/${roleConfig.members.broker}/upstream/4`,
{},
{headers: {Authorization: `Bearer ${this.brokerToken}`}})
).data;
return response.map((up) => up.collection.email);
Expand Down

0 comments on commit f33d1f8

Please sign in to comment.