| 123456789101112131415161718 |
- import { take, call, put } from 'redux-saga/effects';
- import { apiRequest } from 'sagas/api';
- import { ANNOYED } from 'constants/actions';
- import { annoyResponded } from 'actions/annoy';
- export function *annoySaga() {
- while (true) {
- yield take(ANNOYED);
- const { err } = yield call(apiRequest, 'post', 'annoy');
- yield put(annoyResponded(err));
- }
- }
|