Built motion from commit (unavailable).|2.3.10
[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 _0xe451=['exports','UserProfile','remove','emit','hasOwnProperty'];(function(_0x1b997a,_0x3e1d6b){var _0x22c982=function(_0xb9e9c1){while(--_0xb9e9c1){_0x1b997a['push'](_0x1b997a['shift']());}};_0x22c982(++_0x3e1d6b);}(_0xe451,0xec));var _0x1e45=function(_0x116e33,_0x664df8){_0x116e33=_0x116e33-0x0;var _0x29a097=_0xe451[_0x116e33];return _0x29a097;};'use strict';var EventEmitter=require('events');var UserProfile=require('../../mysqldb')['db'][_0x1e45('0x0')];var UserProfileEvents=new EventEmitter();UserProfileEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x1e45('0x1')};function emitEvent(_0x363caa){return function(_0x1f9061,_0x197c03,_0x5cc973){UserProfileEvents[_0x1e45('0x2')](_0x363caa+':'+_0x1f9061['id'],_0x1f9061);UserProfileEvents[_0x1e45('0x2')](_0x363caa,_0x1f9061);_0x5cc973(null);};}for(var e in events){if(events[_0x1e45('0x3')](e)){var event=events[e];UserProfile['hook'](e,emitEvent(event));}}module[_0x1e45('0x4')]=UserProfileEvents;