6b01958a24d73a7e1dfe8cd6c3131ed420bbd01a
[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 _0xed99=['VoicePrefix','save','update','remove','emit','events','../../mysqldb'];(function(_0x39e283,_0x247e6b){var _0x7de89f=function(_0x2f8c50){while(--_0x2f8c50){_0x39e283['push'](_0x39e283['shift']());}};_0x7de89f(++_0x247e6b);}(_0xed99,0x1e1));var _0x9ed9=function(_0x5a6a18,_0x2473f2){_0x5a6a18=_0x5a6a18-0x0;var _0x927d98=_0xed99[_0x5a6a18];return _0x927d98;};'use strict';var EventEmitter=require(_0x9ed9('0x0'));var VoicePrefix=require(_0x9ed9('0x1'))['db'][_0x9ed9('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9ed9('0x3'),'afterUpdate':_0x9ed9('0x4'),'afterDestroy':_0x9ed9('0x5')};function emitEvent(_0x2d26e8){return function(_0x5efff7,_0x116c1b,_0x4a35d7){VoicePrefixEvents[_0x9ed9('0x6')](_0x2d26e8+':'+_0x5efff7['id'],_0x5efff7);VoicePrefixEvents[_0x9ed9('0x6')](_0x2d26e8,_0x5efff7);_0x4a35d7(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;