diff --git a/src/apps.js b/src/apps.js index 4e4afbcee..fdbd7f0fb 100644 --- a/src/apps.js +++ b/src/apps.js @@ -639,14 +639,6 @@ function update(appId, data, auditSource, callback) { newConfig.manifest = manifest; - // TODO: disallow portBindings when an app updates and let ports simply be disabled. the new ports - // might conflict when the update is actually carried out as we do not 'reserve' them in the db - if ('portBindings' in data) { - newConfig.portBindings = data.portBindings; - error = validatePortBindings(data.portBindings, newConfig.manifest.tcpPorts); - if (error) return callback(error); - } - if ('icon' in data) { if (data.icon) { if (!validator.isBase64(data.icon)) return callback(new AppsError(AppsError.BAD_FIELD, 'icon is not base64')); diff --git a/src/routes/apps.js b/src/routes/apps.js index 542eb506d..0b0234fe6 100644 --- a/src/routes/apps.js +++ b/src/routes/apps.js @@ -313,11 +313,10 @@ 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 ('portBindings' in data && typeof data.portBindings !== 'object') return next(new HttpError(400, 'portBindings must be an object')); if ('icon' in data && typeof data.icon !== 'string') return next(new HttpError(400, 'icon is not a string')); 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 with portBindings:%j', req.params.id, data.manifest, data.portBindings); + debug('Update app id:%s to manifest:%j', req.params.id, data.manifest); apps.update(req.params.id, req.body, auditSource(req), function (error) { if (error && error.reason === AppsError.NOT_FOUND) return next(new HttpError(404, 'No such app'));