Built motion from commit ddca4d0d.|2.5.47
[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 _0x9f39=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxAccount','save','update'];(function(_0x546b71,_0x233f83){var _0x3150a0=function(_0x5c8686){while(--_0x5c8686){_0x546b71['push'](_0x546b71['shift']());}};_0x3150a0(++_0x233f83);}(_0x9f39,0x181));var _0x99f3=function(_0x583d9f,_0x215c20){_0x583d9f=_0x583d9f-0x0;var _0x400637=_0x9f39[_0x583d9f];return _0x400637;};'use strict';var EventEmitter=require(_0x99f3('0x0'));var FaxAccount=require(_0x99f3('0x1'))['db'][_0x99f3('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x99f3('0x3'),'afterUpdate':_0x99f3('0x4'),'afterDestroy':_0x99f3('0x5')};function emitEvent(_0x5ca655){return function(_0x5f3c4d,_0x3be2db,_0x4799ba){FaxAccountEvents[_0x99f3('0x6')](_0x5ca655+':'+_0x5f3c4d['id'],_0x5f3c4d);FaxAccountEvents[_0x99f3('0x6')](_0x5ca655,_0x5f3c4d);_0x4799ba(null);};}for(var e in events){if(events[_0x99f3('0x7')](e)){var event=events[e];FaxAccount[_0x99f3('0x8')](e,emitEvent(event));}}module[_0x99f3('0x9')]=FaxAccountEvents;