fd35a357eb90ae8602715eff46bccb17ef0699d6
[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 _0x77ec=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','FaxAccount'];(function(_0x45bf86,_0x75586e){var _0x1f02b7=function(_0x1ea8a3){while(--_0x1ea8a3){_0x45bf86['push'](_0x45bf86['shift']());}};_0x1f02b7(++_0x75586e);}(_0x77ec,0x1ab));var _0xc77e=function(_0x4749cc,_0x43be3f){_0x4749cc=_0x4749cc-0x0;var _0x16c4e5=_0x77ec[_0x4749cc];return _0x16c4e5;};'use strict';var EventEmitter=require(_0xc77e('0x0'));var FaxAccount=require(_0xc77e('0x1'))['db'][_0xc77e('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xc77e('0x3')](0x0);var events={'afterCreate':_0xc77e('0x4'),'afterUpdate':_0xc77e('0x5'),'afterDestroy':_0xc77e('0x6')};function emitEvent(_0x3d6374){return function(_0x3f56fa,_0x5656e2,_0x12007e){FaxAccountEvents[_0xc77e('0x7')](_0x3d6374+':'+_0x3f56fa['id'],_0x3f56fa);FaxAccountEvents[_0xc77e('0x7')](_0x3d6374,_0x3f56fa);_0x12007e(null);};}for(var e in events){if(events[_0xc77e('0x8')](e)){var event=events[e];FaxAccount[_0xc77e('0x9')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;