Fix usage of eventlog.add

This commit is contained in:
Girish Ramakrishnan
2021-06-03 11:42:32 -07:00
parent 2c1bedd38a
commit c90a9e43cf
5 changed files with 21 additions and 24 deletions

View File

@@ -56,7 +56,7 @@ exports = module.exports = {
const ORDERED_ROLES = [ exports.ROLE_USER, exports.ROLE_USER_MANAGER, exports.ROLE_ADMIN, exports.ROLE_OWNER ];
let assert = require('assert'),
const assert = require('assert'),
BoxError = require('./boxerror.js'),
crypto = require('crypto'),
constants = require('./constants.js'),
@@ -328,7 +328,9 @@ function remove(user, auditSource, callback) {
userdb.del(user.id, function (error) {
if (error) return callback(error);
eventlog.add(eventlog.ACTION_USER_REMOVE, auditSource, { userId: user.id, user: removePrivateFields(user) }, callback);
eventlog.add(eventlog.ACTION_USER_REMOVE, auditSource, { userId: user.id, user: removePrivateFields(user) });
callback();
});
}