import {fork} from 'redux-saga/effects';
import {fetchList, fetchItem, createItem} from '../services/customMessage';
import {watch} from './RESTful';

export default function*() {
    yield fork(watch('CREATE_MESSAGE', createItem, '创建'));
    yield fork(watch('FETCH_MESSAGE_LIST', fetchList));
    yield fork(watch('FETCH_MESSAGE', fetchItem));
}
