Built motion from commit 838c2833.|2.6.24
[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 _0x5554=['setMaxListeners','save','remove','emit','hasOwnProperty','events','../../mysqldb','VoicePrefix'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5554,0x18d));var _0x4555=function(_0x13ea00,_0x12f610){_0x13ea00=_0x13ea00-0x0;var _0x1f7347=_0x5554[_0x13ea00];return _0x1f7347;};'use strict';var EventEmitter=require(_0x4555('0x0'));var VoicePrefix=require(_0x4555('0x1'))['db'][_0x4555('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x4555('0x3')](0x0);var events={'afterCreate':_0x4555('0x4'),'afterUpdate':'update','afterDestroy':_0x4555('0x5')};function emitEvent(_0x46ea48){return function(_0x5c2446,_0x1faf54,_0x42d25a){VoicePrefixEvents[_0x4555('0x6')](_0x46ea48+':'+_0x5c2446['id'],_0x5c2446);VoicePrefixEvents[_0x4555('0x6')](_0x46ea48,_0x5c2446);_0x42d25a(null);};}for(var e in events){if(events[_0x4555('0x7')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;