mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-15 18:08:30 -07:00
AG-20835 - Deleted unused methods and variable.
Squashed commit of the following: commit 3d633703fc60e42d26ccf3b5697370c49ffa1a82 Merge: 09119e2ef082312e
Author: Artem Krisanov <a.krisanov@adguard.com> 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: 085bbb5c67d8b7df
Author: Artem Krisanov <a.krisanov@adguard.com> 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 <a.krisanov@adguard.com> Date: Wed Apr 12 14:12:28 2023 +0300 Deleted unused methods and variable.
This commit is contained in:
parent
f082312e49
commit
6c8d89a4da
@ -2,21 +2,6 @@ import { createAction } from 'redux-actions';
|
|||||||
import apiClient from '../api/Api';
|
import apiClient from '../api/Api';
|
||||||
import { addErrorToast, addSuccessToast } from './toasts';
|
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 getBlockedServicesRequest = createAction('GET_BLOCKED_SERVICES_REQUEST');
|
||||||
export const getBlockedServicesFailure = createAction('GET_BLOCKED_SERVICES_FAILURE');
|
export const getBlockedServicesFailure = createAction('GET_BLOCKED_SERVICES_FAILURE');
|
||||||
export const getBlockedServicesSuccess = createAction('GET_BLOCKED_SERVICES_SUCCESS');
|
export const getBlockedServicesSuccess = createAction('GET_BLOCKED_SERVICES_SUCCESS');
|
||||||
|
@ -479,19 +479,12 @@ class Api {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Blocked services
|
// Blocked services
|
||||||
BLOCKED_SERVICES_SERVICES = { path: 'blocked_services/services', method: 'GET' };
|
|
||||||
|
|
||||||
BLOCKED_SERVICES_LIST = { path: 'blocked_services/list', method: 'GET' };
|
BLOCKED_SERVICES_LIST = { path: 'blocked_services/list', method: 'GET' };
|
||||||
|
|
||||||
BLOCKED_SERVICES_SET = { path: 'blocked_services/set', method: 'POST' };
|
BLOCKED_SERVICES_SET = { path: 'blocked_services/set', method: 'POST' };
|
||||||
|
|
||||||
BLOCKED_SERVICES_ALL = { path: 'blocked_services/all', method: 'GET' };
|
BLOCKED_SERVICES_ALL = { path: 'blocked_services/all', method: 'GET' };
|
||||||
|
|
||||||
getBlockedServicesAvailableServices() {
|
|
||||||
const { path, method } = this.BLOCKED_SERVICES_SERVICES;
|
|
||||||
return this.makeRequest(path, method);
|
|
||||||
}
|
|
||||||
|
|
||||||
getAllBlockedServices() {
|
getAllBlockedServices() {
|
||||||
const { path, method } = this.BLOCKED_SERVICES_ALL;
|
const { path, method } = this.BLOCKED_SERVICES_ALL;
|
||||||
return this.makeRequest(path, method);
|
return this.makeRequest(path, method);
|
||||||
|
Loading…
Reference in New Issue
Block a user