Skip to content

Commit

Permalink
added links to response object
Browse files Browse the repository at this point in the history
  • Loading branch information
themarkappleby committed May 10, 2016
1 parent 7e1f65a commit b313083
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/middleware/json-api/res-deserialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ module.exports = {
}
}

if (res && res.meta) {
deserializedResponse.meta = res.meta
if (res) {
var params = ['meta', 'links']
params.forEach(function (param) {
deserializedResponse[param] = res[param]
})
}

return deserializedResponse
Expand Down

0 comments on commit b313083

Please sign in to comment.