Built motion from commit a61a4a20.|2.5.46
[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 _0x5532=['save','remove','hasOwnProperty','hook','events','../../mysqldb','FaxAccount'];(function(_0x43fb47,_0x5ab5b8){var _0xcf1bbe=function(_0x59e7ee){while(--_0x59e7ee){_0x43fb47['push'](_0x43fb47['shift']());}};_0xcf1bbe(++_0x5ab5b8);}(_0x5532,0x19a));var _0x2553=function(_0x39188e,_0x13177e){_0x39188e=_0x39188e-0x0;var _0x30aec4=_0x5532[_0x39188e];return _0x30aec4;};'use strict';var EventEmitter=require(_0x2553('0x0'));var FaxAccount=require(_0x2553('0x1'))['db'][_0x2553('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2553('0x3'),'afterUpdate':'update','afterDestroy':_0x2553('0x4')};function emitEvent(_0x17a930){return function(_0x2e4ec0,_0x5233bd,_0x45926c){FaxAccountEvents['emit'](_0x17a930+':'+_0x2e4ec0['id'],_0x2e4ec0);FaxAccountEvents['emit'](_0x17a930,_0x2e4ec0);_0x45926c(null);};}for(var e in events){if(events[_0x2553('0x5')](e)){var event=events[e];FaxAccount[_0x2553('0x6')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;