Skip to content

Commit

Permalink
adds access to axios config from fetchData action
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed Jun 26, 2017
1 parent c37cf24 commit 22ad235
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/actions/fetchData.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from "axios";
import {dataFold} from "d3plus-viz";

function fetchData(key, url, format = dataFold) {
function fetchData(key, url, format = dataFold, config = {}) {

const returnFunction = (params, store) => {

Expand All @@ -18,7 +18,7 @@ function fetchData(key, url, format = dataFold) {

return {
type: "GET_DATA",
promise: axios.get(u).then(res => ({key, data: format(res.data)}))
promise: axios.get(u, config).then(res => ({key, data: format(res.data)}))
};

};
Expand Down

0 comments on commit 22ad235

Please sign in to comment.