mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-02 06:00:25 +03:00
parent
02b28f4511
commit
f727f999f9
7 changed files with 77 additions and 3 deletions
client/src/api
|
@ -31,6 +31,7 @@ export default class Api {
|
|||
GLOBAL_QUERY_LOG_ENABLE = { path: 'querylog_enable', method: 'POST' };
|
||||
GLOBAL_QUERY_LOG_DISABLE = { path: 'querylog_disable', method: 'POST' };
|
||||
GLOBAL_SET_UPSTREAM_DNS = { path: 'set_upstream_dns', method: 'POST' };
|
||||
GLOBAL_TEST_UPSTREAM_DNS = { path: 'test_upstream_dns', method: 'POST' };
|
||||
GLOBAL_VERSION = { path: 'version.json', method: 'GET' };
|
||||
|
||||
restartGlobalFiltering() {
|
||||
|
@ -108,6 +109,15 @@ export default class Api {
|
|||
return this.makeRequest(path, method, config);
|
||||
}
|
||||
|
||||
testUpstream(servers) {
|
||||
const { path, method } = this.GLOBAL_TEST_UPSTREAM_DNS;
|
||||
const config = {
|
||||
data: servers,
|
||||
header: { 'Content-Type': 'text/plain' },
|
||||
};
|
||||
return this.makeRequest(path, method, config);
|
||||
}
|
||||
|
||||
getGlobalVersion() {
|
||||
const { path, method } = this.GLOBAL_VERSION;
|
||||
return this.makeRequest(path, method);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue