mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
19 lines
391 B
JavaScript
19 lines
391 B
JavaScript
import Events from './collection.js';
|
|
import './helpers';
|
|
import './callbacks.js';
|
|
|
|
// note: do we still need that?
|
|
Events.log = function (event) {
|
|
|
|
// if event is supposed to be unique, check if it has already been logged
|
|
if (!!event.unique && !!Events.findOne({name: event.name})) {
|
|
return;
|
|
}
|
|
|
|
event.createdAt = new Date();
|
|
|
|
Events.insert(event);
|
|
|
|
};
|
|
|
|
export default Events;
|