pass data object to update

This commit is contained in:
Girish Ramakrishnan
2016-06-04 19:06:16 -07:00
parent c916ea2589
commit dbdcf1ec27
2 changed files with 16 additions and 8 deletions

View File

@@ -254,7 +254,7 @@ function updateApp(req, res, next) {
debug('Update app id:%s to manifest:%j with portBindings:%j', req.params.id, data.manifest, data.portBindings);
apps.update(req.params.id, data.force || false, data.manifest, data.portBindings || null, data.icon, auditSource(req), function (error) {
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'));
if (error && error.reason === AppsError.BAD_FIELD) return next(new HttpError(400, error.message));
if (error && error.reason === AppsError.BAD_STATE) return next(new HttpError(409, error.message));