Skip to content

Commit

Permalink
Merge branch 'QA'
Browse files Browse the repository at this point in the history
  • Loading branch information
kmathmann committed Apr 5, 2017
2 parents 9c2dcd5 + a11eae6 commit 6e6b6cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ function request(method, url, body, customHeader) {
config.method = method;
config.headers = {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: `Bearer ${(chaynsInfo) ? chaynsInfo.User.TobitAccessToken : ''}`
'Content-Type': 'application/json'
};

if (chaynsInfo && chaynsInfo.User.TobitAccessToken) {
config.headers.authorization = `Bearer ${chaynsInfo.User.TobitAccessToken}`;
}

for (const type of Object.keys(customHeader || {})) {
config.headers[type] = customHeader[type];
}
Expand Down

0 comments on commit 6e6b6cd

Please sign in to comment.