symphony-integration-commons
Version:
Common components for 3rd party developers build the user facing application for Symphony Integrations.
16 lines (14 loc) • 425 B
JavaScript
import { call, put, select } from 'redux-saga/effects';
import {
removeInstance as deactive,
} from './apiCalls';
export function* removeInstance() {
try {
const instance = yield select(state => state.instance);
yield call(deactive, instance);
yield put({ type: 'SUCCESSFULLY_REMOVED' });
} catch (error) {
yield put({ type: 'FETCH_FAILED', error });
yield put({ type: 'FAILED_OPERATION' });
}
}