| Conditions | 2 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { call, put, takeLatest } from 'redux-saga/effects' |
||
| 6 | function* fetchPosts() { |
||
| 7 | try { |
||
| 8 | const posts = yield call(fetchPostSummary) |
||
| 9 | yield put({ type: toSuccess(FETCH_POSTS), payload: posts }) |
||
| 10 | } catch (e) { |
||
| 11 | yield put({ type: toError(FETCH_POSTS), message: e.message }) |
||
| 12 | } |
||
| 13 | } |
||
| 14 | |||
| 20 |