diff --git a/cloudron.js b/cloudron.js index 081ef7a..efdd454 100644 --- a/cloudron.js +++ b/cloudron.js @@ -238,6 +238,8 @@ Cloudron.prototype.cloneApp = function (appId, newLocation, portBindings) { var backups = this.listAppBackups(appId); + console.log('Backups are ', backups); + 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(); @@ -401,7 +403,7 @@ Cloudron.prototype.resetPassword = function (resetToken, password) { Cloudron.prototype.backupApp = function (appId) { var res = request.post(this._origin + '/api/v1/apps/' + appId + '/backup').query({ access_token: this._credentials.accessToken }).end(); - common.verifyResponse2xx(res, 'Could not schedule backup'); + common.verifyResponse2xx(res, 'Could not schedule a backup'); this.waitForApp(appId); };