{"size": 629, "ext": "js", "max_stars_repo_path": "client/src/saga/handlers/events.js", "max_stars_repo_name": "ahd746/eq-works-product-ws", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/saga/handlers/events.js", "max_issues_repo_name": "ahd746/eq-works-product-ws", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/saga/handlers/events.js", "max_forks_repo_name": "ahd746/eq-works-product-ws", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.2083333333, "max_line_length": 60, "alphanum_fraction": 0.6740858506}
import { put, call } from "redux-saga/effects";
import * as types from "../../redux/types";
import {
  requestGetDailyEvents,
  requestGetHourlyEvents,
} from "../requests/events";

export function* handleGetDailyEvents(action) {
  try {
    const { data } = yield call(requestGetDailyEvents);
    yield put({ type: types.EVENTS_DAILY, payload: data });
  } catch (error) {
    console.log(error);
  }
}
export function* handleGetHourlyEvents(action) {
  try {
    const { data } = yield call(requestGetHourlyEvents);
    yield put({ type: types.EVENTS_HOURLY, payload: data });
  } catch (error) {
    console.log(error);
  }
}
