Built motion from commit 43538d75.|2.5.35
[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 _0x9f26=['remove','emit','hasOwnProperty','hook','../../mysqldb','VoicePrefix','setMaxListeners'];(function(_0x4d95db,_0x28b7e9){var _0x1cc484=function(_0x42c09c){while(--_0x42c09c){_0x4d95db['push'](_0x4d95db['shift']());}};_0x1cc484(++_0x28b7e9);}(_0x9f26,0x9e));var _0x69f2=function(_0x4b4703,_0x174f6b){_0x4b4703=_0x4b4703-0x0;var _0x1e7e8c=_0x9f26[_0x4b4703];return _0x1e7e8c;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x69f2('0x0'))['db'][_0x69f2('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x69f2('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x69f2('0x3')};function emitEvent(_0x2d3498){return function(_0x35f615,_0x2f1578,_0x236de2){VoicePrefixEvents[_0x69f2('0x4')](_0x2d3498+':'+_0x35f615['id'],_0x35f615);VoicePrefixEvents['emit'](_0x2d3498,_0x35f615);_0x236de2(null);};}for(var e in events){if(events[_0x69f2('0x5')](e)){var event=events[e];VoicePrefix[_0x69f2('0x6')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;