directory server: add eventlog entry
This commit is contained in:
@@ -6,6 +6,7 @@ exports = module.exports = {
|
||||
};
|
||||
|
||||
const assert = require('assert'),
|
||||
AuditSource = require('../auditsource.js'),
|
||||
BoxError = require('../boxerror.js'),
|
||||
directoryServer = require('../directoryserver.js'),
|
||||
HttpError = require('connect-lastmile').HttpError,
|
||||
@@ -28,7 +29,7 @@ async function setConfig(req, res, next) {
|
||||
if ('secret' in req.body && typeof req.body.secret !== 'string') return next(new HttpError(400, 'secret must be a string'));
|
||||
if ('allowlist' in req.body && typeof req.body.allowlist !== 'string') return next(new HttpError(400, 'allowlist must be a string'));
|
||||
|
||||
const [error] = await safe(directoryServer.setConfig(req.body));
|
||||
const [error] = await safe(directoryServer.setConfig(req.body, AuditSource.fromRequest(req)));
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, {}));
|
||||
|
||||
Reference in New Issue
Block a user