1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-29 15:28:19 +09:00
mastodon/app/assets/javascripts/components/api.jsx
2016-08-31 16:15:12 +02:00

12 lines
247 B
JavaScript

import axios from 'axios';
export default getState => axios.create({
headers: {
'Authorization': `Bearer ${getState().getIn(['meta', 'access_token'], '')}`
},
transformResponse: [function (data) {
return JSON.parse(data);
}]
});