Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / userProfile / userProfile.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x2891=['events','../../mysqldb','UserProfile','save','remove','emit','hasOwnProperty','exports'];(function(_0x18ae02,_0x5dcb50){var _0x5c2405=function(_0x48c8bb){while(--_0x48c8bb){_0x18ae02['push'](_0x18ae02['shift']());}};_0x5c2405(++_0x5dcb50);}(_0x2891,0xf8));var _0x1289=function(_0x46aff0,_0x122890){_0x46aff0=_0x46aff0-0x0;var _0x9d78cf=_0x2891[_0x46aff0];return _0x9d78cf;};'use strict';var EventEmitter=require(_0x1289('0x0'));var UserProfile=require(_0x1289('0x1'))['db'][_0x1289('0x2')];var UserProfileEvents=new EventEmitter();UserProfileEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x1289('0x3'),'afterUpdate':'update','afterDestroy':_0x1289('0x4')};function emitEvent(_0x2b3507){return function(_0x51eba7,_0x4b472a,_0x573ac5){UserProfileEvents['emit'](_0x2b3507+':'+_0x51eba7['id'],_0x51eba7);UserProfileEvents[_0x1289('0x5')](_0x2b3507,_0x51eba7);_0x573ac5(null);};}for(var e in events){if(events[_0x1289('0x6')](e)){var event=events[e];UserProfile['hook'](e,emitEvent(event));}}module[_0x1289('0x7')]=UserProfileEvents;