Skip to content
Snippets Groups Projects
Commit e4f070dd authored by Chif Gergő's avatar Chif Gergő
Browse files

Extract axios session to a new file and now using export default to export

parent b067d390
No related branches found
No related tags found
No related merge requests found
// TODO: Separate actions
import ax from 'axios';
import axios from './session';
import { GET_USERDATA, PROFILE_CHANGE, GROUP_CHANGE, GET_NEWS } from './types';
export const axios = ax.create({
xsrfCookieName: 'csrftoken',
xsrfHeaderName: 'X-CSRFToken',
});
export const getUserData = () => (
async (dispatch) => {
......
import { axios } from './auth';
import axios from './session';
import { GET_NEWS, WRITE_NEWS, ADD_NEWS, DELETE_NEWS,
CLEAR_WRITE, SELECT_NEWS, EDIT_NEWS } from './types';
......
import ax from 'axios';
const axios = ax.create({
xsrfCookieName: 'csrftoken',
xsrfHeaderName: 'X-CSRFToken',
});
export default axios;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment