Skip to content

Commit

Permalink
Merge pull request #1 from AScripnic/patch-1
Browse files Browse the repository at this point in the history
change: get item from body error
  • Loading branch information
Goria Marcel committed Oct 19, 2015
2 parents 2321efb + 8d4e95f commit 878e509
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default class Client {
listDeployments({ restapiId }) {
return this.getFetcher().get(
`${this._getBaseUrl()}/restapis/${restapiId}/deployments`
).then(body => body.item.map(source => new Deployment(source)));
).then(body => body._embedded.item.map(source => new Deployment(source)));
}

/**
Expand All @@ -207,7 +207,7 @@ export default class Client {
listResources({ restapiId }) {
return this.getFetcher().get(
`${this._getBaseUrl()}/restapis/${restapiId}/resources`
).then(body => body.item.map(source => new Resource(source)));
).then(body => body._embedded.item.map(source => new Resource(source)));
}

/**
Expand All @@ -216,7 +216,7 @@ export default class Client {
listRestapis() {
return this.getFetcher().get(
`${this._getBaseUrl()}/restapis`
).then(body => body.item.map(source => new Restapi(source)));
).then(body => body._embedded.item.map(source => new Restapi(source)));
}

/**
Expand Down

0 comments on commit 878e509

Please sign in to comment.