@@ -338,6 +338,21 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.cloneApp = function (appId, config, callback) {
|
||||
var data = {
|
||||
location: config.location,
|
||||
domain: config.domain,
|
||||
portBindings: config.portBindings,
|
||||
backupId: config.backupId
|
||||
};
|
||||
|
||||
post('/api/v1/apps/' + appId + '/clone', data).success(function (data, status) {
|
||||
if (status !== 201 || typeof data !== 'object') return defaultErrorHandler(callback);
|
||||
|
||||
callback(null);
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.restoreApp = function (appId, backupId, password, callback) {
|
||||
var data = { password: password, backupId: backupId };
|
||||
post('/api/v1/apps/' + appId + '/restore', data).success(function (data, status) {
|
||||
|
||||
Reference in New Issue
Block a user