Built motion from commit (unavailable).|2.4.20
[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 _0x3e3d=['emit','hasOwnProperty','hook','exports','UserProfile','setMaxListeners','save','update','remove'];(function(_0x3826ad,_0x49a30d){var _0x17b900=function(_0x38474f){while(--_0x38474f){_0x3826ad['push'](_0x3826ad['shift']());}};_0x17b900(++_0x49a30d);}(_0x3e3d,0x13f));var _0xd3e3=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x3e3d[_0x501510];return _0x1e6ee5;};'use strict';var EventEmitter=require('events');var UserProfile=require('../../mysqldb')['db'][_0xd3e3('0x0')];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0xd3e3('0x1')](0x0);var events={'afterCreate':_0xd3e3('0x2'),'afterUpdate':_0xd3e3('0x3'),'afterDestroy':_0xd3e3('0x4')};function emitEvent(_0x5dcf16){return function(_0x180398,_0x21e3d7,_0x1e63da){UserProfileEvents[_0xd3e3('0x5')](_0x5dcf16+':'+_0x180398['id'],_0x180398);UserProfileEvents['emit'](_0x5dcf16,_0x180398);_0x1e63da(null);};}for(var e in events){if(events[_0xd3e3('0x6')](e)){var event=events[e];UserProfile[_0xd3e3('0x7')](e,emitEvent(event));}}module[_0xd3e3('0x8')]=UserProfileEvents;