25b8096f41243d9e51325298e8c33997f77af4c6
[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 _0x5738=['hasOwnProperty','hook','events','../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0x4b328e,_0x526e3c){var _0x574290=function(_0x2d2c20){while(--_0x2d2c20){_0x4b328e['push'](_0x4b328e['shift']());}};_0x574290(++_0x526e3c);}(_0x5738,0x1cd));var _0x8573=function(_0x1d20e5,_0x3d4f74){_0x1d20e5=_0x1d20e5-0x0;var _0x14c8d3=_0x5738[_0x1d20e5];return _0x14c8d3;};'use strict';var EventEmitter=require(_0x8573('0x0'));var VoicePrefix=require(_0x8573('0x1'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x8573('0x2')](0x0);var events={'afterCreate':_0x8573('0x3'),'afterUpdate':_0x8573('0x4'),'afterDestroy':_0x8573('0x5')};function emitEvent(_0x147cf7){return function(_0x364926,_0x4edcc8,_0x11a792){VoicePrefixEvents[_0x8573('0x6')](_0x147cf7+':'+_0x364926['id'],_0x364926);VoicePrefixEvents[_0x8573('0x6')](_0x147cf7,_0x364926);_0x11a792(null);};}for(var e in events){if(events[_0x8573('0x7')](e)){var event=events[e];VoicePrefix[_0x8573('0x8')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;