Add separate flags for skipping backup and notification
This commit is contained in:
+2
-2
@@ -1258,8 +1258,8 @@ function update(appId, data, auditSource, callback) {
|
||||
if (error) return callback(error);
|
||||
|
||||
var updateConfig = {
|
||||
skipNotification: data.force,
|
||||
skipBackup: data.force
|
||||
skipNotification: !!data.skipNotification,
|
||||
skipBackup: !!data.skipBackup
|
||||
};
|
||||
|
||||
error = manifestFormat.parse(manifest);
|
||||
|
||||
@@ -489,6 +489,8 @@ function updateApp(req, res, next) {
|
||||
if ('appStoreId' in data && typeof data.appStoreId !== 'string') return next(new HttpError(400, 'appStoreId must be a string'));
|
||||
if (!data.manifest && !data.appStoreId) return next(new HttpError(400, 'appStoreId or manifest is required'));
|
||||
|
||||
if ('skipBackup' in data && typeof data.skipBackup !== 'boolean') return next(new HttpError(400, 'skipBackup must be a boolean'));
|
||||
if ('skipNotification' in data && typeof data.skipNotification !== 'boolean') return next(new HttpError(400, 'skipNotification must be a boolean'));
|
||||
if ('force' in data && typeof data.force !== 'boolean') return next(new HttpError(400, 'force must be a boolean'));
|
||||
|
||||
debug('Update app id:%s to manifest:%j', req.params.id, data.manifest);
|
||||
|
||||
Reference in New Issue
Block a user