Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / user / user.events.js
index 33f9ad9..9f36de5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1267=['exports','events','../../mysqldb','save','update','remove','emit','hasOwnProperty','hook'];(function(_0xc6be3a,_0x540e05){var _0x56a310=function(_0x50a144){while(--_0x50a144){_0xc6be3a['push'](_0xc6be3a['shift']());}};_0x56a310(++_0x540e05);}(_0x1267,0xb5));var _0x7126=function(_0x3131a5,_0x3286bf){_0x3131a5=_0x3131a5-0x0;var _0x83f712=_0x1267[_0x3131a5];return _0x83f712;};'use strict';var EventEmitter=require(_0x7126('0x0'));var User=require(_0x7126('0x1'))['db']['User'];var UserEvents=new EventEmitter();UserEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7126('0x2'),'afterUpdate':_0x7126('0x3'),'afterDestroy':_0x7126('0x4')};function emitEvent(_0x3587d0){return function(_0x35f8e5,_0x403ed4,_0x4346f7){UserEvents['emit'](_0x3587d0+':'+_0x35f8e5['id'],_0x35f8e5);UserEvents[_0x7126('0x5')](_0x3587d0,_0x35f8e5);_0x4346f7(null);};}for(var e in events){if(events[_0x7126('0x6')](e)){var event=events[e];User[_0x7126('0x7')](e,emitEvent(event));}}module[_0x7126('0x8')]=UserEvents;
\ No newline at end of file
+var _0xc574=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','update','remove'];(function(_0x255ce9,_0x4ec5e7){var _0x2dacab=function(_0x1275e2){while(--_0x1275e2){_0x255ce9['push'](_0x255ce9['shift']());}};_0x2dacab(++_0x4ec5e7);}(_0xc574,0x1d4));var _0x4c57=function(_0x46ab79,_0x2dfd34){_0x46ab79=_0x46ab79-0x0;var _0x4e2031=_0xc574[_0x46ab79];return _0x4e2031;};'use strict';var EventEmitter=require(_0x4c57('0x0'));var User=require(_0x4c57('0x1'))['db']['User'];var UserEvents=new EventEmitter();UserEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x4c57('0x2'),'afterDestroy':_0x4c57('0x3')};function emitEvent(_0x4fce6c){return function(_0x837199,_0x5795a4,_0x50e5a2){UserEvents[_0x4c57('0x4')](_0x4fce6c+':'+_0x837199['id'],_0x837199);UserEvents['emit'](_0x4fce6c,_0x837199);_0x50e5a2(null);};}for(var e in events){if(events[_0x4c57('0x5')](e)){var event=events[e];User[_0x4c57('0x6')](e,emitEvent(event));}}module[_0x4c57('0x7')]=UserEvents;
\ No newline at end of file