// import {takeLatest} from 'redux-saga';
// import {take, call, put, fork, cancel, select} from 'redux-saga/effects';
// import {fetchItem, updateItem} from '../services/contract';
// import {message} from 'antd';
//
// import { watchShow, watchUpdate,} from './RESTful';
//
// export default function*() {
//     const ID = 'CONTRACT';
//     yield fork(watchShow(ID, fetchItem));
//     yield fork(watchUpdate(ID, updateItem));
// }


import {fork} from 'redux-saga/effects';
import {fetchItem, updateItem} from '../services/contract';
import {watch, through} from './RESTful';

export default function*() {
    yield fork(watch('UPDATE_CONTRACT', updateItem, '修改'));
    yield fork(watch('FETCH_CONTRACT', fetchItem));
}
