Fix mail location route

This commit is contained in:
Girish Ramakrishnan
2020-08-20 23:05:52 -07:00
parent 2299af1dba
commit d36b06acf7
4 changed files with 10 additions and 9 deletions

View File

@@ -59,7 +59,7 @@ function setLocation(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
if (typeof req.body.domain !== 'string') return next(new HttpError(400, 'domain must be a string'));
if (typeof req.body.subdomain !== 'string') return next(new HttpError(400, 'location must be a string'));
if (typeof req.body.subdomain !== 'string') return next(new HttpError(400, 'subdomain must be a string'));
mail.setLocation(req.body.subdomain, req.body.domain, auditSource.fromRequest(req), function (error, taskId) {
if (error) return next(BoxError.toHttpError(error));