ac87173356f4e02556d2c3020474637967ca2949
[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 _0x6d59=['UserVoiceQueueRt','setMaxListeners','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb'];(function(_0x2b2857,_0x328e5a){var _0x215d52=function(_0x8f200b){while(--_0x8f200b){_0x2b2857['push'](_0x2b2857['shift']());}};_0x215d52(++_0x328e5a);}(_0x6d59,0x97));var _0x96d5=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x6d59[_0x4b369d];return _0x571a98;};'use strict';var EventEmitter=require(_0x96d5('0x0'));var UserVoiceQueueRt=require(_0x96d5('0x1'))['db'][_0x96d5('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x96d5('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x96d5('0x4'),'afterDestroy':_0x96d5('0x5')};function emitEvent(_0x557d6d){return function(_0x6c2946,_0x3221d6,_0x199eff){UserVoiceQueueRtEvents[_0x96d5('0x6')](_0x557d6d+':'+_0x6c2946['id'],_0x6c2946);UserVoiceQueueRtEvents[_0x96d5('0x6')](_0x557d6d,_0x6c2946);_0x199eff(null);};}for(var e in events){if(events[_0x96d5('0x7')](e)){var event=events[e];UserVoiceQueueRt[_0x96d5('0x8')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;