Skip to content

Commit

Permalink
chore: header changes for org
Browse files Browse the repository at this point in the history
  • Loading branch information
patricia-v committed Sep 30, 2022
1 parent e7d927a commit 08a6364
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export async function createBundle(
source: options.source,
...(options.requestId && { 'snyk-request-id': options.requestId }),
...(base64Encoding ? { 'content-type': 'application/octet-stream', 'content-encoding': 'gzip' } : null),
...(options.org ? { org: options.org } : {}),
...(options.org && { 'snyk-org-name': options.org }),
},
url: `${options.baseURL}/bundle`,
method: 'post',
Expand Down Expand Up @@ -285,7 +285,7 @@ export async function checkBundle(options: CheckBundleOptions): Promise<Result<R
...prepareTokenHeaders(options.sessionToken),
source: options.source,
...(options.requestId && { 'snyk-request-id': options.requestId }),
...(options.org ? { org: options.org } : {}),
...(options.org && { 'snyk-org-name': options.org }),
},
url: `${options.baseURL}/bundle/${options.bundleHash}`,
method: 'get',
Expand Down Expand Up @@ -334,7 +334,7 @@ export async function extendBundle(
source: options.source,
...(options.requestId && { 'snyk-request-id': options.requestId }),
...(base64Encoding ? { 'content-type': 'application/octet-stream', 'content-encoding': 'gzip' } : null),
...(options.org ? { org: options.org } : {}),
...(options.org && { 'snyk-org-name': options.org }),
},
url: `${options.baseURL}/bundle/${options.bundleHash}`,
method: 'put',
Expand Down Expand Up @@ -394,7 +394,7 @@ export async function getAnalysis(
...prepareTokenHeaders(options.sessionToken),
source: options.source,
...(options.requestId && { 'snyk-request-id': options.requestId }),
...(options.org ? { org: options.org } : {}),
...(options.org && { 'snyk-org-name': options.org }),
},
url: `${options.baseURL}/analysis`,
method: 'post',
Expand Down

0 comments on commit 08a6364

Please sign in to comment.