diff --git a/lib/fetch.js b/lib/fetch.js index 3a3c631..d747635 100644 --- a/lib/fetch.js +++ b/lib/fetch.js @@ -16,9 +16,10 @@ function fetch (state, path) { return Promise.reject(error) } return internals.fetchProperties({ - url: state.url + '/session/account', + url: state.url + '/session/account?include=profile', sessionId: get(state, 'account.session.id'), - path: path + path: path, + include: 'profile' }) .then(function (properties) { diff --git a/utils/fetch-properties.js b/utils/fetch-properties.js index d284ee1..4e9d7be 100644 --- a/utils/fetch-properties.js +++ b/utils/fetch-properties.js @@ -14,7 +14,7 @@ function fetchProperties (options) { }) .then(function (response) { - var data = deserialise(response.body) + var data = deserialise(response.body, options) return getProperties(data, options.path) })