Built motion from commit 85328c08.|2.5.50
[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 _0x8c50=['hook','../../mysqldb','VoicePrefix','setMaxListeners','save','remove','emit','hasOwnProperty'];(function(_0x5498b8,_0x5033e7){var _0x29c87b=function(_0x249f60){while(--_0x249f60){_0x5498b8['push'](_0x5498b8['shift']());}};_0x29c87b(++_0x5033e7);}(_0x8c50,0x1e9));var _0x08c5=function(_0x421bb8,_0x4b0c79){_0x421bb8=_0x421bb8-0x0;var _0x224bc9=_0x8c50[_0x421bb8];return _0x224bc9;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x08c5('0x0'))['db'][_0x08c5('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x08c5('0x2')](0x0);var events={'afterCreate':_0x08c5('0x3'),'afterUpdate':'update','afterDestroy':_0x08c5('0x4')};function emitEvent(_0x469dbd){return function(_0x465bc2,_0x230166,_0xcd587c){VoicePrefixEvents[_0x08c5('0x5')](_0x469dbd+':'+_0x465bc2['id'],_0x465bc2);VoicePrefixEvents['emit'](_0x469dbd,_0x465bc2);_0xcd587c(null);};}for(var e in events){if(events[_0x08c5('0x6')](e)){var event=events[e];VoicePrefix[_0x08c5('0x7')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;