+ client: add button for check updates

This commit is contained in:
Ildar Kamalov 2019-06-25 17:56:50 +03:00
parent 5d60bb05ab
commit 0e9df33a40
12 changed files with 88 additions and 37 deletions
client/src/api

View file

@ -36,7 +36,7 @@ export default class Api {
GLOBAL_QUERY_LOG_DISABLE = { path: 'querylog_disable', method: 'POST' };
GLOBAL_SET_UPSTREAM_DNS = { path: 'set_upstreams_config', method: 'POST' };
GLOBAL_TEST_UPSTREAM_DNS = { path: 'test_upstream_dns', method: 'POST' };
GLOBAL_VERSION = { path: 'version.json', method: 'GET' };
GLOBAL_VERSION = { path: 'version.json', method: 'POST' };
GLOBAL_ENABLE_PROTECTION = { path: 'enable_protection', method: 'POST' };
GLOBAL_DISABLE_PROTECTION = { path: 'disable_protection', method: 'POST' };
GLOBAL_UPDATE = { path: 'update', method: 'POST' };
@ -125,9 +125,13 @@ export default class Api {
return this.makeRequest(path, method, config);
}
getGlobalVersion() {
getGlobalVersion(data) {
const { path, method } = this.GLOBAL_VERSION;
return this.makeRequest(path, method);
const config = {
data,
headers: { 'Content-Type': 'application/json' },
};
return this.makeRequest(path, method, config);
}
enableGlobalProtection() {