Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / api / chatWebsite / chatWebsite.events.js
1 const a112_0x1704=['emit','save','events','ChatWebsite','addHook','setMaxListeners','../../mysqldb','update'];(function(_0x369bf8,_0x1704d8){const _0x592aa6=function(_0x177b50){while(--_0x177b50){_0x369bf8['push'](_0x369bf8['shift']());}};_0x592aa6(++_0x1704d8);}(a112_0x1704,0x1a6));const a112_0x592a=function(_0x369bf8,_0x1704d8){_0x369bf8=_0x369bf8-0x0;let _0x592aa6=a112_0x1704[_0x369bf8];return _0x592aa6;};const _0x3afcec=a112_0x592a;'use strict';const EventEmitter=require(_0x3afcec('0x4')),ChatWebsite=require(_0x3afcec('0x0'))['db'][_0x3afcec('0x5')],ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x3afcec('0x7')](0x0);const events={'afterCreate':_0x3afcec('0x3'),'afterUpdate':_0x3afcec('0x1'),'afterDestroy':'remove'};function emitEvent(_0x177b50){return function(_0x23973d){const _0x19aee3=a112_0x592a;ChatWebsiteEvents['emit'](_0x177b50+':'+_0x23973d['id'],_0x23973d),ChatWebsiteEvents[_0x19aee3('0x2')](_0x177b50,_0x23973d);};}for(const e in events){if(typeof events[e]!=='undefined'){const event=events[e];ChatWebsite[_0x3afcec('0x6')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents;