import { queryAuditList } from '@/services/boom';

export default {
  namespace: 'xflow',
  state: {
    OSSData: {},
    flowDetail: { nodes: [], edges: [] },
    auditList: [],
    formData: [],
  },

  effects: {
    *queryAuditList({ payload }, { call, put }) {
      const response = yield call(queryAuditList, payload);
      if (response) {
        yield put({
          type: 'save',
          payload: { auditList: response.data },
        });
      }
    },
  },

  reducers: {
    save(state, action) {
      return {
        ...state,
        ...action.payload,
      };
    },
  },
};
