Files
planka/client/src/sagas/app/watchers/list.js
T
2020-03-25 00:15:47 +05:00

25 lines
772 B
JavaScript

import { all, takeLatest } from 'redux-saga/effects';
import {
createListInCurrentBoardService,
deleteListService,
moveListService,
updateListService,
} from '../services';
import EntryActionTypes from '../../../constants/EntryActionTypes';
export default function* () {
yield all([
takeLatest(EntryActionTypes.LIST_IN_CURRENT_BOARD_CREATE, ({ payload: { data } }) =>
createListInCurrentBoardService(data),
),
takeLatest(EntryActionTypes.LIST_UPDATE, ({ payload: { id, data } }) =>
updateListService(id, data),
),
takeLatest(EntryActionTypes.LIST_MOVE, ({ payload: { id, index } }) =>
moveListService(id, index),
),
takeLatest(EntryActionTypes.LIST_DELETE, ({ payload: { id } }) => deleteListService(id)),
]);
}