cbb712ed8d8add2e757521317647d60fdd23fc1d
[motion2.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.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 _0x148f=['exports','../../mysqldb','setMaxListeners','update','remove','emit'];(function(_0x233eba,_0x3dc416){var _0x40efa3=function(_0xc07c57){while(--_0xc07c57){_0x233eba['push'](_0x233eba['shift']());}};_0x40efa3(++_0x3dc416);}(_0x148f,0xa9));var _0xf148=function(_0x5652e3,_0x5d1a11){_0x5652e3=_0x5652e3-0x0;var _0x1b31c0=_0x148f[_0x5652e3];return _0x1b31c0;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0xf148('0x0'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xf148('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf148('0x2'),'afterDestroy':_0xf148('0x3')};function emitEvent(_0x1535c6){return function(_0x43b867,_0x49779f,_0x1d0a0a){UserVoiceQueueRtEvents[_0xf148('0x4')](_0x1535c6+':'+_0x43b867['id'],_0x43b867);UserVoiceQueueRtEvents[_0xf148('0x4')](_0x1535c6,_0x43b867);_0x1d0a0a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0xf148('0x5')]=UserVoiceQueueRtEvents;