summaryrefslogtreecommitdiff
path: root/src/api/sagas/index.js
blob: 426b344ab6562080928c8177985c4a5d6b8d9b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import {takeEvery} from "redux-saga/effects";
import {LOG_IN} from "../../actions/auth";
import {ADD_SIMULATION, DELETE_SIMULATION} from "../../actions/simulations";
import {FETCH_AUTHORIZATIONS_OF_CURRENT_USER} from "../../actions/users";
import {onSimulationAdd, onSimulationDelete} from "./simulations";
import {onFetchAuthorizationsOfCurrentUser, onFetchLoggedInUser} from "./users";

export default function* rootSaga() {
    yield takeEvery(LOG_IN, onFetchLoggedInUser);
    yield takeEvery(FETCH_AUTHORIZATIONS_OF_CURRENT_USER, onFetchAuthorizationsOfCurrentUser);
    yield takeEvery(ADD_SIMULATION, onSimulationAdd);
    yield takeEvery(DELETE_SIMULATION, onSimulationDelete);
}