Built motion from commit 3c2ce842.|2.6.31
[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 _0xd075=['FaxAccount','save','update','remove','hasOwnProperty','hook','exports'];(function(_0x2a62b1,_0x23f742){var _0x16b9f2=function(_0x382b99){while(--_0x382b99){_0x2a62b1['push'](_0x2a62b1['shift']());}};_0x16b9f2(++_0x23f742);}(_0xd075,0xcb));var _0x5d07=function(_0x6c75a4,_0x414eb3){_0x6c75a4=_0x6c75a4-0x0;var _0x88afc8=_0xd075[_0x6c75a4];return _0x88afc8;};'use strict';var EventEmitter=require('events');var FaxAccount=require('../../mysqldb')['db'][_0x5d07('0x0')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x5d07('0x1'),'afterUpdate':_0x5d07('0x2'),'afterDestroy':_0x5d07('0x3')};function emitEvent(_0xbf9c7d){return function(_0x501fb9,_0x3242bd,_0x1c6acc){FaxAccountEvents['emit'](_0xbf9c7d+':'+_0x501fb9['id'],_0x501fb9);FaxAccountEvents['emit'](_0xbf9c7d,_0x501fb9);_0x1c6acc(null);};}for(var e in events){if(events[_0x5d07('0x4')](e)){var event=events[e];FaxAccount[_0x5d07('0x5')](e,emitEvent(event));}}module[_0x5d07('0x6')]=FaxAccountEvents;