From 6c8d89a4da561c55eb20c4242916a5fd85058419 Mon Sep 17 00:00:00 2001 From: Artem Krisanov Date: Thu, 13 Apr 2023 11:07:13 +0300 Subject: [PATCH] AG-20835 - Deleted unused methods and variable. Squashed commit of the following: commit 3d633703fc60e42d26ccf3b5697370c49ffa1a82 Merge: 09119e2e f082312e Author: Artem Krisanov Date: Thu Apr 13 10:58:31 2023 +0300 Merge branch 'master' of ssh://bit.adguard.com:7999/dns/adguard-home into AG-20835 commit 09119e2ec6f3116986d3ddeb48ee2eb18c1cd9d7 Merge: 085bbb5c 67d8b7df Author: Artem Krisanov Date: Wed Apr 12 14:55:22 2023 +0300 Merge branch 'master' of ssh://bit.adguard.com:7999/dns/adguard-home into AG-20835 commit 085bbb5cabb14d5388e45ab2022840d44ae42874 Author: Artem Krisanov Date: Wed Apr 12 14:12:28 2023 +0300 Deleted unused methods and variable. --- client/src/actions/services.js | 15 --------------- client/src/api/Api.js | 7 ------- 2 files changed, 22 deletions(-) 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);