update: set/unset appStoreId from the update route

This commit is contained in:
Girish Ramakrishnan
2020-12-09 16:51:49 -08:00
parent 822964116f
commit 67ccb180c9
+3 -2
View File
@@ -1253,7 +1253,8 @@ function update(app, data, auditSource, callback) {
const skipBackup = !!data.skipBackup,
appId = app.id,
manifest = data.manifest;
manifest = data.manifest,
appStoreId = data.appStoreId;
let values = {};
@@ -1268,7 +1269,7 @@ function update(app, data, auditSource, callback) {
error = checkManifestConstraints(manifest);
if (error) return callback(error);
var updateConfig = { skipBackup, manifest };
var updateConfig = { skipBackup, manifest, appStoreId }; // this will clear appStoreId when updating from a repo and set it if passed in for update route
// prevent user from installing a app with different manifest id over an existing app
// this allows cloudron install -f --app <appid> for an app installed from the appStore