From 8fc44e6bc9e8aa25821d540971b2ba2b59b43af4 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 3 Jun 2016 19:08:47 -0700 Subject: [PATCH] remove redundant checks --- src/routes/apps.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/routes/apps.js b/src/routes/apps.js index b60422588..a9f7671cf 100644 --- a/src/routes/apps.js +++ b/src/routes/apps.js @@ -95,7 +95,6 @@ function installApp(req, res, next) { var data = req.body; - if (!data) return next(new HttpError(400, 'Cannot parse data field')); if (!data.manifest || typeof data.manifest !== 'object') return next(new HttpError(400, 'manifest is required')); if (typeof data.appStoreId !== 'string') return next(new HttpError(400, 'appStoreId is required')); if (typeof data.location !== 'string') return next(new HttpError(400, 'location is required')); @@ -135,7 +134,6 @@ function configureApp(req, res, next) { var data = req.body; - if (!data) return next(new HttpError(400, 'Cannot parse data field')); if (typeof data.location !== 'string') return next(new HttpError(400, 'location is required')); if (('portBindings' in data) && typeof data.portBindings !== 'object') return next(new HttpError(400, 'portBindings must be an object')); if (typeof data.accessRestriction !== 'object') return next(new HttpError(400, 'accessRestriction is required')); @@ -239,7 +237,6 @@ function updateApp(req, res, next) { var data = req.body; - if (!data) return next(new HttpError(400, 'Cannot parse data field')); if (!data.manifest || typeof data.manifest !== 'object') return next(new HttpError(400, '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'));