Built motion from commit efa66e19.|2.6.22
[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 _0xf921=['../../mysqldb','VoicePrefix','setMaxListeners','save','update','remove','emit','hasOwnProperty','events'];(function(_0x7880d2,_0x32e7d6){var _0x35ebbe=function(_0x5c27fa){while(--_0x5c27fa){_0x7880d2['push'](_0x7880d2['shift']());}};_0x35ebbe(++_0x32e7d6);}(_0xf921,0x128));var _0x1f92=function(_0x9e575,_0x5894d4){_0x9e575=_0x9e575-0x0;var _0x522277=_0xf921[_0x9e575];return _0x522277;};'use strict';var EventEmitter=require(_0x1f92('0x0'));var VoicePrefix=require(_0x1f92('0x1'))['db'][_0x1f92('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x1f92('0x3')](0x0);var events={'afterCreate':_0x1f92('0x4'),'afterUpdate':_0x1f92('0x5'),'afterDestroy':_0x1f92('0x6')};function emitEvent(_0x183a43){return function(_0x5e59be,_0xb3fbb9,_0x399f2e){VoicePrefixEvents[_0x1f92('0x7')](_0x183a43+':'+_0x5e59be['id'],_0x5e59be);VoicePrefixEvents['emit'](_0x183a43,_0x5e59be);_0x399f2e(null);};}for(var e in events){if(events[_0x1f92('0x8')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;