eventlog: always use AuditSource objects as source field
This commit is contained in:
@@ -111,7 +111,7 @@ function postProcess(record) {
|
||||
// never throws, only logs because previously code did not take a callback
|
||||
async function add(action, source, data) {
|
||||
assert.strictEqual(typeof action, 'string');
|
||||
assert.strictEqual(typeof source, 'object');
|
||||
assert.strictEqual(typeof source, 'object'); // an AuditSource
|
||||
assert.strictEqual(typeof data, 'object');
|
||||
|
||||
const id = uuid.v4();
|
||||
@@ -123,7 +123,7 @@ async function add(action, source, data) {
|
||||
// never throws, only logs because previously code did not take a callback
|
||||
async function upsertLoginEvent(action, source, data) {
|
||||
assert.strictEqual(typeof action, 'string');
|
||||
assert.strictEqual(typeof source, 'object');
|
||||
assert.strictEqual(typeof source, 'object'); // an AuditSource
|
||||
assert.strictEqual(typeof data, 'object');
|
||||
|
||||
// can't do a real sql upsert, for frequent eventlog entries we only have to do 2 queries once a day
|
||||
|
||||
Reference in New Issue
Block a user