feat: #8864, add action:events.log

This commit is contained in:
Barış Soner Uşaklı
2020-11-10 11:29:15 -05:00
parent 20f4fe085f
commit 9c5c32d4a5

View File

@@ -8,6 +8,7 @@ const db = require('./database');
const batch = require('./batch');
const user = require('./user');
const utils = require('./utils');
const plugins = require('./plugins');
const events = module.exports;
@@ -78,6 +79,7 @@ events.log = async function (data) {
], data.timestamp, eid),
db.setObject('event:' + eid, data),
]);
plugins.fireHook('action:events.log', { data: data });
};
events.getEvents = async function (filter, start, stop, from, to) {