97947ee79a1028b31059dac951db4f13105357d8
[motion2.git] / server / api / voicePrefix / voicePrefix.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 _0x245b=['../../mysqldb','save','update','emit','hasOwnProperty','hook','exports','events'];(function(_0x1da04e,_0x31024b){var _0xdd8c41=function(_0x2036f9){while(--_0x2036f9){_0x1da04e['push'](_0x1da04e['shift']());}};_0xdd8c41(++_0x31024b);}(_0x245b,0x137));var _0xb245=function(_0x5ea928,_0x38d0f1){_0x5ea928=_0x5ea928-0x0;var _0x8c993f=_0x245b[_0x5ea928];return _0x8c993f;};'use strict';var EventEmitter=require(_0xb245('0x0'));var VoicePrefix=require(_0xb245('0x1'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb245('0x2'),'afterUpdate':_0xb245('0x3'),'afterDestroy':'remove'};function emitEvent(_0x9b553){return function(_0x12134a,_0x1b410d,_0x26c5da){VoicePrefixEvents[_0xb245('0x4')](_0x9b553+':'+_0x12134a['id'],_0x12134a);VoicePrefixEvents[_0xb245('0x4')](_0x9b553,_0x12134a);_0x26c5da(null);};}for(var e in events){if(events[_0xb245('0x5')](e)){var event=events[e];VoicePrefix[_0xb245('0x6')](e,emitEvent(event));}}module[_0xb245('0x7')]=VoicePrefixEvents;