Built motion from commit 994c64e1.|2.6.1
[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 _0xc80c=['emit','hasOwnProperty','hook','exports','events','FaxAccount','update','remove'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xc80c,0x94));var _0xcc80=function(_0x68c979,_0x431cff){_0x68c979=_0x68c979-0x0;var _0x4f0001=_0xc80c[_0x68c979];return _0x4f0001;};'use strict';var EventEmitter=require(_0xcc80('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0xcc80('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xcc80('0x2'),'afterDestroy':_0xcc80('0x3')};function emitEvent(_0x24ee22){return function(_0x31cfc7,_0x4da8d9,_0x137281){FaxAccountEvents['emit'](_0x24ee22+':'+_0x31cfc7['id'],_0x31cfc7);FaxAccountEvents[_0xcc80('0x4')](_0x24ee22,_0x31cfc7);_0x137281(null);};}for(var e in events){if(events[_0xcc80('0x5')](e)){var event=events[e];FaxAccount[_0xcc80('0x6')](e,emitEvent(event));}}module[_0xcc80('0x7')]=FaxAccountEvents;