Built motion from commit 994c64e1.|2.6.1
[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 _0x9d97=['emit','hook','events','VoicePrefix','setMaxListeners','save','update','remove'];(function(_0x1d24eb,_0x12295b){var _0x1dc576=function(_0x4d5770){while(--_0x4d5770){_0x1d24eb['push'](_0x1d24eb['shift']());}};_0x1dc576(++_0x12295b);}(_0x9d97,0x1da));var _0x79d9=function(_0x23fddc,_0x1423c5){_0x23fddc=_0x23fddc-0x0;var _0x22920d=_0x9d97[_0x23fddc];return _0x22920d;};'use strict';var EventEmitter=require(_0x79d9('0x0'));var VoicePrefix=require('../../mysqldb')['db'][_0x79d9('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x79d9('0x2')](0x0);var events={'afterCreate':_0x79d9('0x3'),'afterUpdate':_0x79d9('0x4'),'afterDestroy':_0x79d9('0x5')};function emitEvent(_0x254510){return function(_0x5e9ad8,_0x4b1f54,_0x48dfc1){VoicePrefixEvents[_0x79d9('0x6')](_0x254510+':'+_0x5e9ad8['id'],_0x5e9ad8);VoicePrefixEvents[_0x79d9('0x6')](_0x254510,_0x5e9ad8);_0x48dfc1(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix[_0x79d9('0x7')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;