Permalink
Browse files

fix(axios): problems related to #65

  • Loading branch information...
pi0 committed Jul 15, 2017
1 parent b0d2565 commit 4e7dd3f9ac151d3751c90392789a7c3ae1f7cb24
Showing with 3 additions and 2 deletions.
  1. +3 −2 modules/axios/plugin.js
@@ -63,10 +63,11 @@ function setHeader (name, value, scopes = 'common') {
this.defaults.headers[scope][name] = value
})
}

// Set requests token
function setToken (token, type, scopes = 'common') {
value = !token ? null : (type ? type + ' ' : '') + token
setHeader('Authorization', value, scopes)
const value = !token ? null : (type ? type + ' ' : '') + token
this.setHeader('Authorization', value, scopes)
}

// Nuxt friendly error handler

0 comments on commit 4e7dd3f

Please sign in to comment.