diff --git a/src/Components/SmartComponents/SystemDetailsPage/SystemDetailsPage.js b/src/Components/SmartComponents/SystemDetailsPage/SystemDetailsPage.js index 2fb2199fe..414ba0ae0 100644 --- a/src/Components/SmartComponents/SystemDetailsPage/SystemDetailsPage.js +++ b/src/Components/SmartComponents/SystemDetailsPage/SystemDetailsPage.js @@ -4,7 +4,7 @@ import propTypes from 'prop-types'; import React, { useEffect } from 'react'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; -import { fetchSystemDetails, optOutSystemAction } from '../../../Store/Actions/Actions'; +import { fetchSystemDetails, optOutSystemsAction } from '../../../Store/Actions/Actions'; import { systemDetailsPageStore } from '../../../Store/Reducers/SystemDetailsPageStore'; import ReducerRegistry from '../../../Utilities/ReducerRegistry'; import Header from '../../PresentationalComponents/Header/Header'; @@ -135,7 +135,7 @@ function mapStateToProps(state) { const mapDispatchToProps = dispatch => { return { - optOutSystem: (system, status) => dispatch(optOutSystemAction(system, status)), + optOutSystem: (system, toExclude) => dispatch(optOutSystemsAction([system], toExclude)), fetchSystemDetails: system => dispatch(fetchSystemDetails(system)), addNotification: notification => dispatch(addNotification(notification)) }; diff --git a/src/Helpers/APIHelper.js b/src/Helpers/APIHelper.js index 4f927a081..820f99167 100644 --- a/src/Helpers/APIHelper.js +++ b/src/Helpers/APIHelper.js @@ -23,11 +23,6 @@ export function getSystemDetails(system) { return result; } -export function optOutSystem(system, status) { - let result = api.setSystemOptOut(system, status); - return result; -} - export function setSystemCveStatus(params) { let result = api.setStatus(params); return result; diff --git a/src/Store/Actions/Actions.js b/src/Store/Actions/Actions.js index 09f4f3b4e..f693d2298 100644 --- a/src/Store/Actions/Actions.js +++ b/src/Store/Actions/Actions.js @@ -47,13 +47,6 @@ export const fetchCveListByAccount = apiProps => ({ payload: APIHelper.getCveListByAccount(apiProps) }); -export const optOutSystemAction = (system, status) => ({ - type: ActionTypes.SYSTEM_OPT_OUT, - payload: new Promise(resolve => { - resolve(APIHelper.optOutSystem(system, status)); - }).then(result => result) -}); - export const fetchCveListBySystem = apiProps => ({ type: ActionTypes.FETCH_SYSTEM_CVE_LIST, meta: new Date(),