Fix mail location route
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user