Built motion from commit da617fac.|2.6.6
[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 _0xf0f8=['update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','setMaxListeners'];(function(_0x5ce230,_0x3e301c){var _0x4e1dfe=function(_0x56e2a8){while(--_0x56e2a8){_0x5ce230['push'](_0x5ce230['shift']());}};_0x4e1dfe(++_0x3e301c);}(_0xf0f8,0x6d));var _0x8f0f=function(_0x1e9d7a,_0x400b7a){_0x1e9d7a=_0x1e9d7a-0x0;var _0x390ae4=_0xf0f8[_0x1e9d7a];return _0x390ae4;};'use strict';var EventEmitter=require(_0x8f0f('0x0'));var VoicePrefix=require(_0x8f0f('0x1'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x8f0f('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x8f0f('0x3'),'afterDestroy':_0x8f0f('0x4')};function emitEvent(_0xe77699){return function(_0x30502d,_0x4776ac,_0x5060db){VoicePrefixEvents[_0x8f0f('0x5')](_0xe77699+':'+_0x30502d['id'],_0x30502d);VoicePrefixEvents['emit'](_0xe77699,_0x30502d);_0x5060db(null);};}for(var e in events){if(events[_0x8f0f('0x6')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0x8f0f('0x7')]=VoicePrefixEvents;