Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / faxAccount / faxAccount.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 _0xac08=['emit','hook','exports','events','../../mysqldb','setMaxListeners','save','update','remove'];(function(_0x2a7b74,_0x45b0d5){var _0x114666=function(_0x1a293b){while(--_0x1a293b){_0x2a7b74['push'](_0x2a7b74['shift']());}};_0x114666(++_0x45b0d5);}(_0xac08,0xae));var _0x8ac0=function(_0x3f36e5,_0x106313){_0x3f36e5=_0x3f36e5-0x0;var _0x21bdae=_0xac08[_0x3f36e5];return _0x21bdae;};'use strict';var EventEmitter=require(_0x8ac0('0x0'));var FaxAccount=require(_0x8ac0('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x8ac0('0x2')](0x0);var events={'afterCreate':_0x8ac0('0x3'),'afterUpdate':_0x8ac0('0x4'),'afterDestroy':_0x8ac0('0x5')};function emitEvent(_0x23da3c){return function(_0x2658a3,_0x3d87de,_0x2051d1){FaxAccountEvents[_0x8ac0('0x6')](_0x23da3c+':'+_0x2658a3['id'],_0x2658a3);FaxAccountEvents[_0x8ac0('0x6')](_0x23da3c,_0x2658a3);_0x2051d1(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount[_0x8ac0('0x7')](e,emitEvent(event));}}module[_0x8ac0('0x8')]=FaxAccountEvents;