Built motion from commit (unavailable).|2.4.17
[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 _0x937c=['update','remove','emit','hasOwnProperty','../../mysqldb','FaxAccount','setMaxListeners','save'];(function(_0x1928c9,_0x13a6d1){var _0x51b5fb=function(_0x24cf70){while(--_0x24cf70){_0x1928c9['push'](_0x1928c9['shift']());}};_0x51b5fb(++_0x13a6d1);}(_0x937c,0x114));var _0xc937=function(_0x51e1d5,_0x399588){_0x51e1d5=_0x51e1d5-0x0;var _0x105666=_0x937c[_0x51e1d5];return _0x105666;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0xc937('0x0'))['db'][_0xc937('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xc937('0x2')](0x0);var events={'afterCreate':_0xc937('0x3'),'afterUpdate':_0xc937('0x4'),'afterDestroy':_0xc937('0x5')};function emitEvent(_0x2b5705){return function(_0x5af34d,_0x1478da,_0x37eb05){FaxAccountEvents[_0xc937('0x6')](_0x2b5705+':'+_0x5af34d['id'],_0x5af34d);FaxAccountEvents[_0xc937('0x6')](_0x2b5705,_0x5af34d);_0x37eb05(null);};}for(var e in events){if(events[_0xc937('0x7')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module['exports']=FaxAccountEvents;