Built motion from commit eddce310.|2.6.12
[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 _0x2885=['VoicePrefix','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x4d8dbf,_0x5bc3d8){var _0x50d8e6=function(_0x5aef53){while(--_0x5aef53){_0x4d8dbf['push'](_0x4d8dbf['shift']());}};_0x50d8e6(++_0x5bc3d8);}(_0x2885,0x1e9));var _0x5288=function(_0xef8146,_0x459c34){_0xef8146=_0xef8146-0x0;var _0x5a6cb0=_0x2885[_0xef8146];return _0x5a6cb0;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x5288('0x0'))['db'][_0x5288('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x5288('0x2')](0x0);var events={'afterCreate':_0x5288('0x3'),'afterUpdate':_0x5288('0x4'),'afterDestroy':_0x5288('0x5')};function emitEvent(_0x383a09){return function(_0x534f78,_0x490025,_0x272d94){VoicePrefixEvents[_0x5288('0x6')](_0x383a09+':'+_0x534f78['id'],_0x534f78);VoicePrefixEvents[_0x5288('0x6')](_0x383a09,_0x534f78);_0x272d94(null);};}for(var e in events){if(events[_0x5288('0x7')](e)){var event=events[e];VoicePrefix[_0x5288('0x8')](e,emitEvent(event));}}module[_0x5288('0x9')]=VoicePrefixEvents;