+ client: handle access settings

This commit is contained in:
Ildar Kamalov 2019-05-30 17:26:19 +03:00
parent 821ad3edd9
commit 02db488b30
11 changed files with 259 additions and 4 deletions
client/src/api

View file

@ -460,4 +460,22 @@ export default class Api {
};
return this.makeRequest(path, method, parameters);
}
// DNS access settings
ACCESS_LIST = { path: 'access/list', method: 'GET' };
ACCESS_SET = { path: 'access/set', method: 'POST' };
getAccessList() {
const { path, method } = this.ACCESS_LIST;
return this.makeRequest(path, method);
}
setAccessList(config) {
const { path, method } = this.ACCESS_SET;
const parameters = {
data: config,
headers: { 'Content-Type': 'application/json' },
};
return this.makeRequest(path, method, parameters);
}
}