diff --git a/cloudron.js b/cloudron.js index b7fec90..e1de428 100644 --- a/cloudron.js +++ b/cloudron.js @@ -236,7 +236,9 @@ Cloudron.prototype.configureApp = function (appId, newLocation, altDomain /* opt Cloudron.prototype.cloneApp = function (appId, newLocation, portBindings) { portBindings = portBindings || null; - var data = { location: newLocation, password: this._credentials.password, portBindings: portBindings }; + var backups = this.listAppBackups(appId); + + var data = { location: newLocation, password: this._credentials.password, portBindings: portBindings, backupId: backups[0].id }; var res = request.post(this._origin + '/api/v1/apps/' + appId + '/clone').query({ access_token: this._credentials.accessToken }).send(data).end(); common.verifyResponse2xx(res, 'App could not be clone');