+ client: handle check host

This commit is contained in:
Ildar Kamalov
2020-01-22 17:25:50 +03:00
committed by Simon Zolin
parent 0d7c01d50f
commit 8ec7c37715
12 changed files with 318 additions and 4 deletions

View File

@@ -82,6 +82,7 @@ class Api {
FILTERING_REFRESH = { path: 'filtering/refresh', method: 'POST' };
FILTERING_SET_URL = { path: 'filtering/set_url', method: 'POST' };
FILTERING_CONFIG = { path: 'filtering/config', method: 'POST' };
FILTERING_CHECK_HOST = { path: 'filtering/check_host', method: 'GET' };
getFilteringStatus() {
const { path, method } = this.FILTERING_STATUS;
@@ -141,6 +142,12 @@ class Api {
return this.makeRequest(path, method, parameters);
}
checkHost(params) {
const { path, method } = this.FILTERING_CHECK_HOST;
const url = getPathWithQueryString(path, params);
return this.makeRequest(url, method);
}
// Parental
PARENTAL_STATUS = { path: 'parental/status', method: 'GET' };
PARENTAL_ENABLE = { path: 'parental/enable', method: 'POST' };