mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-02 22:12:53 +03:00
Added components for web setup
This commit is contained in:
parent
71259c5f19
commit
5349ec76fd
31 changed files with 1144 additions and 15 deletions
client/src/api
|
@ -336,4 +336,22 @@ export default class Api {
|
|||
};
|
||||
return this.makeRequest(path, method, parameters);
|
||||
}
|
||||
|
||||
// Installation
|
||||
GET_DEFAULT_ADDRESSES = { path: 'install/get_default_addresses', method: 'GET' };
|
||||
SET_ALL_SETTINGS = { path: 'install/set_all_settings', method: 'POST' };
|
||||
|
||||
getDefaultAddresses() {
|
||||
const { path, method } = this.GET_DEFAULT_ADDRESSES;
|
||||
return this.makeRequest(path, method);
|
||||
}
|
||||
|
||||
setAllSettings(config) {
|
||||
const { path, method } = this.SET_ALL_SETTINGS;
|
||||
const parameters = {
|
||||
data: config,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
};
|
||||
return this.makeRequest(path, method, parameters);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue