Built motion from commit (unavailable).|2.2.0
[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 _0x062e=['../../mysqldb','FaxAccount','setMaxListeners','update','remove','emit','hook','exports'];(function(_0x2d12a1,_0x22fa42){var _0x4aa4e0=function(_0x3fe33c){while(--_0x3fe33c){_0x2d12a1['push'](_0x2d12a1['shift']());}};_0x4aa4e0(++_0x22fa42);}(_0x062e,0x158));var _0xe062=function(_0x3a562c,_0x21ec51){_0x3a562c=_0x3a562c-0x0;var _0x444c65=_0x062e[_0x3a562c];return _0x444c65;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0xe062('0x0'))['db'][_0xe062('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xe062('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xe062('0x3'),'afterDestroy':_0xe062('0x4')};function emitEvent(_0x203492){return function(_0x46c784,_0x190070,_0x44b218){FaxAccountEvents[_0xe062('0x5')](_0x203492+':'+_0x46c784['id'],_0x46c784);FaxAccountEvents[_0xe062('0x5')](_0x203492,_0x46c784);_0x44b218(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount[_0xe062('0x6')](e,emitEvent(event));}}module[_0xe062('0x7')]=FaxAccountEvents;