Built motion from commit e1760111.|2.6.18
[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 _0x9b8b=['events','../../mysqldb','VoicePrefix','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x335bb1,_0x5aa97e){var _0x4c2fc7=function(_0xe358fc){while(--_0xe358fc){_0x335bb1['push'](_0x335bb1['shift']());}};_0x4c2fc7(++_0x5aa97e);}(_0x9b8b,0x96));var _0xb9b8=function(_0x46c4ba,_0x4b270f){_0x46c4ba=_0x46c4ba-0x0;var _0x16312a=_0x9b8b[_0x46c4ba];return _0x16312a;};'use strict';var EventEmitter=require(_0xb9b8('0x0'));var VoicePrefix=require(_0xb9b8('0x1'))['db'][_0xb9b8('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb9b8('0x3'),'afterUpdate':_0xb9b8('0x4'),'afterDestroy':_0xb9b8('0x5')};function emitEvent(_0x3df4f9){return function(_0x4b82a7,_0x1b9541,_0x3c8398){VoicePrefixEvents['emit'](_0x3df4f9+':'+_0x4b82a7['id'],_0x4b82a7);VoicePrefixEvents[_0xb9b8('0x6')](_0x3df4f9,_0x4b82a7);_0x3c8398(null);};}for(var e in events){if(events[_0xb9b8('0x7')](e)){var event=events[e];VoicePrefix[_0xb9b8('0x8')](e,emitEvent(event));}}module[_0xb9b8('0x9')]=VoicePrefixEvents;