Built motion from commit c1aa34a0.|2.6.28
[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 _0x211e=['exports','events','../../mysqldb','FaxAccount','setMaxListeners','save','emit','hasOwnProperty','hook'];(function(_0x530090,_0x74ce3e){var _0x258633=function(_0x3b90eb){while(--_0x3b90eb){_0x530090['push'](_0x530090['shift']());}};_0x258633(++_0x74ce3e);}(_0x211e,0x1b1));var _0xe211=function(_0x494b17,_0x5bb833){_0x494b17=_0x494b17-0x0;var _0x288f59=_0x211e[_0x494b17];return _0x288f59;};'use strict';var EventEmitter=require(_0xe211('0x0'));var FaxAccount=require(_0xe211('0x1'))['db'][_0xe211('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xe211('0x3')](0x0);var events={'afterCreate':_0xe211('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x38cabc){return function(_0x2344b0,_0x3dcb93,_0x461a87){FaxAccountEvents['emit'](_0x38cabc+':'+_0x2344b0['id'],_0x2344b0);FaxAccountEvents[_0xe211('0x5')](_0x38cabc,_0x2344b0);_0x461a87(null);};}for(var e in events){if(events[_0xe211('0x6')](e)){var event=events[e];FaxAccount[_0xe211('0x7')](e,emitEvent(event));}}module[_0xe211('0x8')]=FaxAccountEvents;