Built motion from commit 3c2ce842.|2.6.31
[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 _0x44e8=['emit','hasOwnProperty','hook','../../mysqldb','VoicePrefix','save','update'];(function(_0xc1adf1,_0x1ec932){var _0x12a7c9=function(_0x33446f){while(--_0x33446f){_0xc1adf1['push'](_0xc1adf1['shift']());}};_0x12a7c9(++_0x1ec932);}(_0x44e8,0x15a));var _0x844e=function(_0x55a912,_0xc705c1){_0x55a912=_0x55a912-0x0;var _0x30f199=_0x44e8[_0x55a912];return _0x30f199;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x844e('0x0'))['db'][_0x844e('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x844e('0x2'),'afterUpdate':_0x844e('0x3'),'afterDestroy':'remove'};function emitEvent(_0x3fdbdd){return function(_0x546e4f,_0x395231,_0x12ded0){VoicePrefixEvents[_0x844e('0x4')](_0x3fdbdd+':'+_0x546e4f['id'],_0x546e4f);VoicePrefixEvents[_0x844e('0x4')](_0x3fdbdd,_0x546e4f);_0x12ded0(null);};}for(var e in events){if(events[_0x844e('0x5')](e)){var event=events[e];VoicePrefix[_0x844e('0x6')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;