about summary refs log tree commit diff
path: root/app/assets/javascripts/components/api.jsx
blob: f317af094257a3a81d187bcfb5825984d42517e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import axios from 'axios';

export default getState => axios.create({
  headers: {
    'Authorization': `Bearer ${getState().getIn(['meta', 'access_token'], '')}`
  },

  transformResponse: [function (data) {
    return JSON.parse(data);
  }]
});