@@ -630,17 +630,17 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.addAuthorizedKey = function (key, callback) {
|
||||
put('/api/v1/cloudron/ssh/authorized_keys', { key: key }, null, function (error, data, status) {
|
||||
Client.prototype.getRemoteSupport = function (callback) {
|
||||
get('/api/v1/support/remote_support', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 201) return callback(new ClientError(status, data));
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
callback(null);
|
||||
callback(null, data.enabled);
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.delAuthorizedKey = function (identifier, callback) {
|
||||
del('/api/v1/cloudron/ssh/authorized_keys/' + identifier, null, function (error, data, status) {
|
||||
Client.prototype.enableRemoteSupport = function (enable, callback) {
|
||||
post('/api/v1/support/remote_support', { enable: enable }, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 202) return callback(new ClientError(status, data));
|
||||
|
||||
@@ -648,15 +648,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.getAuthorizedKeys = function (callback) {
|
||||
get('/api/v1/cloudron/ssh/authorized_keys', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
callback(null, data.keys);
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.getBackups = function (callback) {
|
||||
get('/api/v1/backups', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
|
||||
Reference in New Issue
Block a user