diff --git a/client/src/actions/services.js b/client/src/actions/services.js index f360081e..2f5f20db 100644 --- a/client/src/actions/services.js +++ b/client/src/actions/services.js @@ -2,21 +2,6 @@ import { createAction } from 'redux-actions'; import apiClient from '../api/Api'; import { addErrorToast, addSuccessToast } from './toasts'; -export const getBlockedServicesAvailableServicesRequest = createAction('GET_BLOCKED_SERVICES_AVAILABLE_SERVICES_REQUEST'); -export const getBlockedServicesAvailableServicesFailure = createAction('GET_BLOCKED_SERVICES_AVAILABLE_SERVICES_FAILURE'); -export const getBlockedServicesAvailableServicesSuccess = createAction('GET_BLOCKED_SERVICES_AVAILABLE_SERVICES_SUCCESS'); - -export const getBlockedServicesAvailableServices = () => async (dispatch) => { - dispatch(getBlockedServicesAvailableServicesRequest()); - try { - const data = await apiClient.getBlockedServicesAvailableServices(); - dispatch(getBlockedServicesAvailableServicesSuccess(data)); - } catch (error) { - dispatch(addErrorToast({ error })); - dispatch(getBlockedServicesAvailableServicesFailure()); - } -}; - export const getBlockedServicesRequest = createAction('GET_BLOCKED_SERVICES_REQUEST'); export const getBlockedServicesFailure = createAction('GET_BLOCKED_SERVICES_FAILURE'); export const getBlockedServicesSuccess = createAction('GET_BLOCKED_SERVICES_SUCCESS'); diff --git a/client/src/api/Api.js b/client/src/api/Api.js index 7ca33293..30c2db1d 100644 --- a/client/src/api/Api.js +++ b/client/src/api/Api.js @@ -479,19 +479,12 @@ class Api { } // Blocked services - BLOCKED_SERVICES_SERVICES = { path: 'blocked_services/services', method: 'GET' }; - BLOCKED_SERVICES_LIST = { path: 'blocked_services/list', method: 'GET' }; BLOCKED_SERVICES_SET = { path: 'blocked_services/set', method: 'POST' }; BLOCKED_SERVICES_ALL = { path: 'blocked_services/all', method: 'GET' }; - getBlockedServicesAvailableServices() { - const { path, method } = this.BLOCKED_SERVICES_SERVICES; - return this.makeRequest(path, method); - } - getAllBlockedServices() { const { path, method } = this.BLOCKED_SERVICES_ALL; return this.makeRequest(path, method);