Built motion from commit fe909640.|2.6.8
[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 _0xc197=['save','update','remove','emit','hasOwnProperty','hook','exports','events','VoicePrefix','setMaxListeners'];(function(_0x41b0d5,_0x2f7baa){var _0xb9c58b=function(_0x41fcf9){while(--_0x41fcf9){_0x41b0d5['push'](_0x41b0d5['shift']());}};_0xb9c58b(++_0x2f7baa);}(_0xc197,0x147));var _0x7c19=function(_0x2ff4a5,_0x2bcc4e){_0x2ff4a5=_0x2ff4a5-0x0;var _0x2e5a20=_0xc197[_0x2ff4a5];return _0x2e5a20;};'use strict';var EventEmitter=require(_0x7c19('0x0'));var VoicePrefix=require('../../mysqldb')['db'][_0x7c19('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x7c19('0x2')](0x0);var events={'afterCreate':_0x7c19('0x3'),'afterUpdate':_0x7c19('0x4'),'afterDestroy':_0x7c19('0x5')};function emitEvent(_0x30909c){return function(_0x174c9b,_0x51dec4,_0x1de8d7){VoicePrefixEvents[_0x7c19('0x6')](_0x30909c+':'+_0x174c9b['id'],_0x174c9b);VoicePrefixEvents['emit'](_0x30909c,_0x174c9b);_0x1de8d7(null);};}for(var e in events){if(events[_0x7c19('0x7')](e)){var event=events[e];VoicePrefix[_0x7c19('0x8')](e,emitEvent(event));}}module[_0x7c19('0x9')]=VoicePrefixEvents;