import {fork} from 'redux-saga/effects';
import {fetchList, fetchItem, createItem, updateItem} from '../services/banner';
import {message} from 'antd';

import {watchIndex, watchShow, watchCreate, watchEdit, watch} from './RESTful';

export default function*() {
    const ID = 'BANNER';
    yield fork(watchIndex(ID, fetchList));
    yield fork(watchShow(ID, fetchItem));
    yield fork(watchCreate(ID, createItem));
    yield fork(watchEdit(ID, updateItem));
    yield fork(watch('UPDATE_BANNER_ITEM_STATUS', updateItem));

}
