Skip to content

Commit 2e44be1

Browse files
committedOct 31, 2023
Pass axios config through for getRelated calls.
1 parent 354d8e6 commit 2e44be1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsonapi-vuex",
3-
"version": "5.13.0",
3+
"version": "5.13.1",
44
"description": "Access restructured JSONAPI data from a Vuex Store.",
55
"author": "Matthew Richardson <M.Richardson@ed.ac.uk>",
66
"scripts": {
@@ -37,7 +37,7 @@
3737
"babel-polyfill": "^6.26.0",
3838
"chai": "^4.3.7",
3939
"chai-as-promised": "^7.1.1",
40-
"chromedriver": "^113.0.0",
40+
"chromedriver": "^118.0.0",
4141
"concurrently": "^7.6.0",
4242
"core-js": "^3.29.1",
4343
"eslint": "^8.36.0",

‎src/actions.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const actions = (api, conf) => {
125125
* @return {object} Restructured representation of the requested item(s)
126126
*/
127127
getRelated: async (context, args) => {
128-
const data = utils.unpackArgs(args)[0]
128+
const [data, config] = utils.unpackArgs(args)
129129
let [type, id, relName] = utils.getTypeId(data)
130130
if (!type || !id) {
131131
throw 'No type/id specified'
@@ -156,7 +156,7 @@ const actions = (api, conf) => {
156156
// so fetch relationships resource linkage for these
157157
if (!relItems) {
158158
try {
159-
const resLink = await api.get(`${type}/${id}/relationships/${relName}`)
159+
const resLink = await api.get(`${type}/${id}/relationships/${relName}`, config)
160160
relItems = resLink.data
161161
} catch (error) {
162162
throw `No such relationship: ${relName}`
@@ -185,7 +185,7 @@ const actions = (api, conf) => {
185185
entry = { [jvtag]: entry }
186186
}
187187
relNames.push(relName)
188-
relPromises.push(context.dispatch('get', entry))
188+
relPromises.push(context.dispatch('get', [entry, config]))
189189
}
190190
} else {
191191
// Empty to-one rels should have a relName but no data

0 commit comments

Comments
 (0)
Please sign in to comment.