Skip to content

Commit

Permalink
chore: Use newer endpoint for excluding/including systems (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
leSamo authored Nov 18, 2021
1 parent 9eb9a9e commit e90afd6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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))
};
Expand Down
5 changes: 0 additions & 5 deletions src/Helpers/APIHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions src/Store/Actions/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit e90afd6

Please sign in to comment.