Added components for web setup

This commit is contained in:
Ildar Kamalov 2019-01-18 20:17:48 +03:00 committed by Eugene Bujak
parent 71259c5f19
commit 5349ec76fd
31 changed files with 1144 additions and 15 deletions
client/src/api

View file

@ -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);
}
}