{"size": 426, "ext": "js", "max_stars_repo_path": "client/src/actions/weather-stations.js", "max_stars_repo_name": "RoraxHan/weather-app", "max_stars_repo_stars_event_min_datetime": "2018-09-20T06:59:43.000Z", "max_stars_repo_stars_event_max_datetime": "2018-09-22T13:14:49.000Z", "max_issues_repo_path": "client/src/actions/weather-stations.js", "max_issues_repo_name": "RoraxHan/weather-app", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/actions/weather-stations.js", "max_forks_repo_name": "RoraxHan/weather-app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.5217391304, "max_line_length": 58, "alphanum_fraction": 0.6807511737}
import * as types from './ActionTypes';
import api from '../api';

export function fetchedAllWeatherStations(stations) {
  return {
    type: types.FETCHED_ALL_STATIONS,
    stations,
  }
}







export const fetchAllWeatherStations = () => dispatch => {
  api.getAllWeatherStation()
  .then(res => {
    console.log('all weather station is..', res.data);
    dispatch(fetchedAllWeatherStations(res.data.stations))
  })    
}