Built motion from commit 14588770.|2.5.38
[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 _0x5071=['exports','events','../../mysqldb','update','remove','emit','hasOwnProperty','hook'];(function(_0x3b231a,_0x53a00d){var _0x18d67a=function(_0x5e14c6){while(--_0x5e14c6){_0x3b231a['push'](_0x3b231a['shift']());}};_0x18d67a(++_0x53a00d);}(_0x5071,0xd1));var _0x1507=function(_0x4d8524,_0x1e8925){_0x4d8524=_0x4d8524-0x0;var _0xbdb413=_0x5071[_0x4d8524];return _0xbdb413;};'use strict';var EventEmitter=require(_0x1507('0x0'));var VoicePrefix=require(_0x1507('0x1'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x1507('0x2'),'afterDestroy':_0x1507('0x3')};function emitEvent(_0x1f87bb){return function(_0x4e46a6,_0x10e034,_0x53436d){VoicePrefixEvents[_0x1507('0x4')](_0x1f87bb+':'+_0x4e46a6['id'],_0x4e46a6);VoicePrefixEvents[_0x1507('0x4')](_0x1f87bb,_0x4e46a6);_0x53436d(null);};}for(var e in events){if(events[_0x1507('0x5')](e)){var event=events[e];VoicePrefix[_0x1507('0x6')](e,emitEvent(event));}}module[_0x1507('0x7')]=VoicePrefixEvents;