Built motion from commit (unavailable).|2.5.26
[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 _0x8642=['exports','events','save','update','remove','emit','hasOwnProperty'];(function(_0x5f5b62,_0x5246f9){var _0x5adce8=function(_0xc9198b){while(--_0xc9198b){_0x5f5b62['push'](_0x5f5b62['shift']());}};_0x5adce8(++_0x5246f9);}(_0x8642,0x1cf));var _0x2864=function(_0x20cc29,_0x30a46d){_0x20cc29=_0x20cc29-0x0;var _0x28d513=_0x8642[_0x20cc29];return _0x28d513;};'use strict';var EventEmitter=require(_0x2864('0x0'));var UserProfile=require('../../mysqldb')['db']['UserProfile'];var UserProfileEvents=new EventEmitter();UserProfileEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2864('0x1'),'afterUpdate':_0x2864('0x2'),'afterDestroy':_0x2864('0x3')};function emitEvent(_0x1d65fd){return function(_0x57c19c,_0x6f23f7,_0x9869de){UserProfileEvents[_0x2864('0x4')](_0x1d65fd+':'+_0x57c19c['id'],_0x57c19c);UserProfileEvents[_0x2864('0x4')](_0x1d65fd,_0x57c19c);_0x9869de(null);};}for(var e in events){if(events[_0x2864('0x5')](e)){var event=events[e];UserProfile['hook'](e,emitEvent(event));}}module[_0x2864('0x6')]=UserProfileEvents;