Built motion from commit 85328c08.|2.5.50
[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 _0xee10=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoicePrefix','setMaxListeners','update'];(function(_0x595891,_0x10f3a6){var _0x3996c1=function(_0x402a7a){while(--_0x402a7a){_0x595891['push'](_0x595891['shift']());}};_0x3996c1(++_0x10f3a6);}(_0xee10,0x87));var _0x0ee1=function(_0x15f9cd,_0x285493){_0x15f9cd=_0x15f9cd-0x0;var _0x40dcc3=_0xee10[_0x15f9cd];return _0x40dcc3;};'use strict';var EventEmitter=require(_0x0ee1('0x0'));var VoicePrefix=require(_0x0ee1('0x1'))['db'][_0x0ee1('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x0ee1('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x0ee1('0x4'),'afterDestroy':_0x0ee1('0x5')};function emitEvent(_0xb29600){return function(_0x39630,_0x26b5d3,_0xa8d851){VoicePrefixEvents[_0x0ee1('0x6')](_0xb29600+':'+_0x39630['id'],_0x39630);VoicePrefixEvents[_0x0ee1('0x6')](_0xb29600,_0x39630);_0xa8d851(null);};}for(var e in events){if(events[_0x0ee1('0x7')](e)){var event=events[e];VoicePrefix[_0x0ee1('0x8')](e,emitEvent(event));}}module[_0x0ee1('0x9')]=VoicePrefixEvents;