Fix links assignment on some AJAX requests

pull/1407/head
Jared Scheib 2017-05-02 19:05:29 -07:00 committed by Tim Raymond
parent 4eec2002b8
commit 7e468b98ae
1 changed files with 3 additions and 3 deletions

View File

@ -25,8 +25,6 @@ export default async function AJAX({
links = linksRes.data
}
const {auth} = links
if (resource) {
url = id
? `${basepath}${links[resource]}/${id}`
@ -41,9 +39,11 @@ export default async function AJAX({
headers,
})
const {auth} = links
return {
auth,
...response,
auth: {links: auth},
}
} catch (error) {
const {response} = error