Add get/setSysinfoConfig
This commit is contained in:
@@ -649,6 +649,24 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Client.prototype.setSysinfoConfig = function (config, callback) {
|
||||||
|
post('/api/v1/settings/sysinfo_config', config, null, function (error, data, status) {
|
||||||
|
if (error) return callback(error);
|
||||||
|
if (status !== 200) return callback(new ClientError(status, data));
|
||||||
|
|
||||||
|
callback(null);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
Client.prototype.getSysinfoConfig = function (callback) {
|
||||||
|
get('/api/v1/settings/sysinfo_config', null, function (error, data, status) {
|
||||||
|
if (error) return callback(error);
|
||||||
|
if (status !== 200) return callback(new ClientError(status, data));
|
||||||
|
|
||||||
|
callback(null, data);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
Client.prototype.setDynamicDnsConfig = function (enabled, callback) {
|
Client.prototype.setDynamicDnsConfig = function (enabled, callback) {
|
||||||
post('/api/v1/settings/dynamic_dns', { enabled: enabled }, null, function (error, data, status) {
|
post('/api/v1/settings/dynamic_dns', { enabled: enabled }, null, function (error, data, status) {
|
||||||
if (error) return callback(error);
|
if (error) return callback(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user