Skip to content

Commit

Permalink
altered js to pull top level links
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonrichardsmith committed Aug 23, 2016
1 parent af5bd32 commit f04afb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/orders/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
console.log("Received response: " + JSON.stringify(body));
var jsonBody = JSON.parse(body);
var customerlink = jsonBody._embedded.customer[0]._links.customer.href;
var addressLink = jsonBody._embedded.customer[0].addresses[0]._links.address.href;
var cardLink = jsonBody._embedded.customer[0].cards[0]._links.card.href;
var addressLink = jsonBody._embedded.customer[0]._links.addresses.href;
var cardLink = jsonBody._embedded.customer[0]._links.cards.href;
var order = {
"customer": customerlink,
"address": null,
Expand Down

0 comments on commit f04afb3

Please sign in to comment.