diff options
Diffstat (limited to 'app/javascript/themes/glitch/util/api.js')
-rw-r--r-- | app/javascript/themes/glitch/util/api.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/app/javascript/themes/glitch/util/api.js b/app/javascript/themes/glitch/util/api.js deleted file mode 100644 index ecc703c0a..000000000 --- a/app/javascript/themes/glitch/util/api.js +++ /dev/null @@ -1,26 +0,0 @@ -import axios from 'axios'; -import LinkHeader from './link_header'; - -export const getLinks = response => { - const value = response.headers.link; - - if (!value) { - return { refs: [] }; - } - - return LinkHeader.parse(value); -}; - -export default getState => axios.create({ - headers: { - 'Authorization': `Bearer ${getState().getIn(['meta', 'access_token'], '')}`, - }, - - transformResponse: [function (data) { - try { - return JSON.parse(data); - } catch(Exception) { - return data; - } - }], -}); |