X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2Fnotification%2Fnotification.events.js;h=4619cf34b22c5d330cde64298fab8a6acba33b27;hb=08f6e0b86d261e0f7c3417afd107d7f774257198;hp=7a4ff546600d74301eb763195fc00f1f67c110b8;hpb=77cac286a995d5774f6d69ad14d2f583dccfe84b;p=motion2.git diff --git a/server/api/notification/notification.events.js b/server/api/notification/notification.events.js index 7a4ff54..4619cf3 100644 --- a/server/api/notification/notification.events.js +++ b/server/api/notification/notification.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb10b=['hasOwnProperty','hook','events','Notification','setMaxListeners','save','remove','emit'];(function(_0xc40c9,_0x2a94d4){var _0x52bc7f=function(_0x2264d1){while(--_0x2264d1){_0xc40c9['push'](_0xc40c9['shift']());}};_0x52bc7f(++_0x2a94d4);}(_0xb10b,0x12a));var _0xbb10=function(_0x5e87a3,_0x58c1d1){_0x5e87a3=_0x5e87a3-0x0;var _0x69c6ab=_0xb10b[_0x5e87a3];return _0x69c6ab;};'use strict';var EventEmitter=require(_0xbb10('0x0'));var Notification=require('../../mysqldb')['db'][_0xbb10('0x1')];var NotificationEvents=new EventEmitter();NotificationEvents[_0xbb10('0x2')](0x0);var events={'afterCreate':_0xbb10('0x3'),'afterUpdate':'update','afterDestroy':_0xbb10('0x4')};function emitEvent(_0x9bbed){return function(_0x460981,_0x22320e,_0x49baf4){NotificationEvents[_0xbb10('0x5')](_0x9bbed+':'+_0x460981['id'],_0x460981);NotificationEvents['emit'](_0x9bbed,_0x460981);_0x49baf4(null);};}for(var e in events){if(events[_0xbb10('0x6')](e)){var event=events[e];Notification[_0xbb10('0x7')](e,emitEvent(event));}}module['exports']=NotificationEvents; \ No newline at end of file +var _0x757a=['../../mysqldb','Notification','remove','emit','hasOwnProperty','hook'];(function(_0x4184f2,_0x373154){var _0x4fe73=function(_0x377434){while(--_0x377434){_0x4184f2['push'](_0x4184f2['shift']());}};_0x4fe73(++_0x373154);}(_0x757a,0xde));var _0xa757=function(_0x3e5f28,_0x11d8f9){_0x3e5f28=_0x3e5f28-0x0;var _0x10def3=_0x757a[_0x3e5f28];return _0x10def3;};'use strict';var EventEmitter=require('events');var Notification=require(_0xa757('0x0'))['db'][_0xa757('0x1')];var NotificationEvents=new EventEmitter();NotificationEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xa757('0x2')};function emitEvent(_0x1721c6){return function(_0x1c2932,_0x453d07,_0x32630d){NotificationEvents[_0xa757('0x3')](_0x1721c6+':'+_0x1c2932['id'],_0x1c2932);NotificationEvents['emit'](_0x1721c6,_0x1c2932);_0x32630d(null);};}for(var e in events){if(events[_0xa757('0x4')](e)){var event=events[e];Notification[_0xa757('0x5')](e,emitEvent(event));}}module['exports']=NotificationEvents; \ No newline at end of file