Built motion from commit 3e059bc2.|2.5.32
[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 _0xb33c=['events','setMaxListeners','save','remove','hasOwnProperty','exports'];(function(_0x5a64bb,_0x40c4ab){var _0x459df3=function(_0x56bd3f){while(--_0x56bd3f){_0x5a64bb['push'](_0x5a64bb['shift']());}};_0x459df3(++_0x40c4ab);}(_0xb33c,0x186));var _0xcb33=function(_0x196ced,_0x10e948){_0x196ced=_0x196ced-0x0;var _0x522c8d=_0xb33c[_0x196ced];return _0x522c8d;};'use strict';var EventEmitter=require(_0xcb33('0x0'));var VoicePrefix=require('../../mysqldb')['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xcb33('0x1')](0x0);var events={'afterCreate':_0xcb33('0x2'),'afterUpdate':'update','afterDestroy':_0xcb33('0x3')};function emitEvent(_0xde88dd){return function(_0x2cd7b2,_0x936ae1,_0x1c77c4){VoicePrefixEvents['emit'](_0xde88dd+':'+_0x2cd7b2['id'],_0x2cd7b2);VoicePrefixEvents['emit'](_0xde88dd,_0x2cd7b2);_0x1c77c4(null);};}for(var e in events){if(events[_0xcb33('0x4')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0xcb33('0x5')]=VoicePrefixEvents;