remove superfluous validation

This commit is contained in:
Girish Ramakrishnan
2022-07-13 12:06:48 +05:30
parent 2af29fd844
commit 6ab237034d

View File

@@ -409,7 +409,6 @@ async function setLocation(req, res, next) {
assert.strictEqual(typeof req.app, 'object');
if (typeof req.body.subdomain !== 'string') return next(new HttpError(400, 'subdomain must be string')); // subdomain may be an empty string
if (!req.body.domain) return next(new HttpError(400, 'domain is required'));
if (typeof req.body.domain !== 'string') return next(new HttpError(400, 'domain must be string'));
if ('portBindings' in req.body && typeof req.body.portBindings !== 'object') return next(new HttpError(400, 'portBindings must be an object'));