1d848e34974c27e489eaabc688636e415da3e9ad
[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 _0xdcaa=['emit','hook','exports','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xdcaa,0x93));var _0xadca=function(_0x5613e8,_0x208429){_0x5613e8=_0x5613e8-0x0;var _0x438a78=_0xdcaa[_0x5613e8];return _0x438a78;};'use strict';var EventEmitter=require(_0xadca('0x0'));var VoicePrefix=require(_0xadca('0x1'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xadca('0x2')](0x0);var events={'afterCreate':_0xadca('0x3'),'afterUpdate':_0xadca('0x4'),'afterDestroy':'remove'};function emitEvent(_0x31493e){return function(_0x5e79eb,_0x143891,_0x1dc307){VoicePrefixEvents[_0xadca('0x5')](_0x31493e+':'+_0x5e79eb['id'],_0x5e79eb);VoicePrefixEvents[_0xadca('0x5')](_0x31493e,_0x5e79eb);_0x1dc307(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix[_0xadca('0x6')](e,emitEvent(event));}}module[_0xadca('0x7')]=VoicePrefixEvents;