Skip to content

Commit

Permalink
fix: composite api endpoint uri changed
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandiest committed Mar 10, 2016
1 parent 0a36e33 commit 78aae5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function forteApi(credentials, scope, options) {
composite: {
query(query) {
validateArgs('composite_query', arguments)
return client.post(ApiPaths.composite.query, { data: query })
return client.post(ApiPaths.composite.query(scope), { data: query })
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export const ApiPaths = {
}
},
composite: {
query: '/composite'
query(scope) {
return `/forte/composite/${scope.trunk}/${scope.branch}/`
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ describe('forteApi', () => {
}
]
validQueries.forEach((query) => {
let expected = expectedUri(ApiPaths.composite.query)
let expected = expectedUri(ApiPaths.composite.query(validTrunkAndBranchScope))
//it(`should POST uri: ${expected} with body ${JSON.stringify(query)}`, () => {
it(`should POST uri: ${expected}`, () => {
let getCompositeMock = mockapi.post(expected, 200, query)
Expand Down

0 comments on commit 78aae5a

Please sign in to comment.