Encode URI component

This commit is contained in:
Girish Ramakrishnan 2017-01-10 11:57:05 -08:00
parent ebef455fe3
commit 5f115c24c7

View File

@ -156,7 +156,7 @@ AppStore.prototype.getManifest = function (appId, version) {
};
AppStore.prototype.restore = function (boxId, backupId) {
var res = request.post(this._origin + '/api/v1/cloudrons/' + boxId + '/restore/' + backupId).query({ accessToken: this._credentials.accessToken }).end();
var res = request.post(this._origin + '/api/v1/cloudrons/' + boxId + '/restore/' + encodeURIComponent(backupId)).query({ accessToken: this._credentials.accessToken }).end();
common.verifyResponse2xx(res, 'Could not restore cloudron');
};