Built motion from commit 8dca541896b0ff92bb88a36cc13f4f385b593b4b. Version 3.0.0...
[motion-next.git] / server / api / plugin / plugin.events.js
index 0041dad..acc9879 100644 (file)
@@ -1 +1 @@
-const a516_0x5b25=['emit','setMaxListeners','undefined','exports','save','addHook','remove','../../mysqldb'];(function(_0x1fcc04,_0x5b2575){const _0x1f3d62=function(_0x473c38){while(--_0x473c38){_0x1fcc04['push'](_0x1fcc04['shift']());}};_0x1f3d62(++_0x5b2575);}(a516_0x5b25,0x19f));const a516_0x1f3d=function(_0x1fcc04,_0x5b2575){_0x1fcc04=_0x1fcc04-0x0;let _0x1f3d62=a516_0x5b25[_0x1fcc04];return _0x1f3d62;};const _0x20fe28=a516_0x1f3d;'use strict';const EventEmitter=require('events'),Plugin=require(_0x20fe28('0x0'))['db']['Plugin'],PluginEvents=new EventEmitter();PluginEvents[_0x20fe28('0x2')](0x0);const events={'afterCreate':_0x20fe28('0x5'),'afterUpdate':'update','afterDestroy':_0x20fe28('0x7')};function emitEvent(_0x473c38){return function(_0x704986){const _0xc400df=a516_0x1f3d;PluginEvents[_0xc400df('0x1')](_0x473c38+':'+_0x704986['id'],_0x704986),PluginEvents[_0xc400df('0x1')](_0x473c38,_0x704986);};}for(const e in events){if(typeof events[e]!==_0x20fe28('0x3')){const event=events[e];Plugin[_0x20fe28('0x6')](e,emitEvent(event));}}module[_0x20fe28('0x4')]=PluginEvents;
\ No newline at end of file
+const a516_0xceac=['update','save','../../mysqldb','events','exports','emit'];(function(_0x441dee,_0xceac22){const _0x28b7fd=function(_0x3dcef3){while(--_0x3dcef3){_0x441dee['push'](_0x441dee['shift']());}};_0x28b7fd(++_0xceac22);}(a516_0xceac,0xf7));const a516_0x28b7=function(_0x441dee,_0xceac22){_0x441dee=_0x441dee-0x0;let _0x28b7fd=a516_0xceac[_0x441dee];return _0x28b7fd;};const _0x416f9f=a516_0x28b7;'use strict';const EventEmitter=require(_0x416f9f('0x2')),Plugin=require(_0x416f9f('0x1'))['db']['Plugin'],PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);const events={'afterCreate':_0x416f9f('0x0'),'afterUpdate':_0x416f9f('0x5'),'afterDestroy':'remove'};function emitEvent(_0x3dcef3){return function(_0xb6d357){const _0x37d663=a516_0x28b7;PluginEvents[_0x37d663('0x4')](_0x3dcef3+':'+_0xb6d357['id'],_0xb6d357),PluginEvents[_0x37d663('0x4')](_0x3dcef3,_0xb6d357);};}for(const e in events){if(typeof events[e]!=='undefined'){const event=events[e];Plugin['addHook'](e,emitEvent(event));}}module[_0x416f9f('0x3')]=PluginEvents;
\ No newline at end of file