b4600537f8bd8ed4170650b5d4102a6dc60c6c0e
[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 _0x73cb=['FaxAccount','setMaxListeners','remove','emit','hasOwnProperty','events','../../mysqldb'];(function(_0x295a3d,_0x56d487){var _0x23a732=function(_0x15cfc2){while(--_0x15cfc2){_0x295a3d['push'](_0x295a3d['shift']());}};_0x23a732(++_0x56d487);}(_0x73cb,0x101));var _0xb73c=function(_0x565e33,_0x352c79){_0x565e33=_0x565e33-0x0;var _0x49ab3d=_0x73cb[_0x565e33];return _0x49ab3d;};'use strict';var EventEmitter=require(_0xb73c('0x0'));var FaxAccount=require(_0xb73c('0x1'))['db'][_0xb73c('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xb73c('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xb73c('0x4')};function emitEvent(_0x52650f){return function(_0x42d885,_0x593bd6,_0x2dda00){FaxAccountEvents[_0xb73c('0x5')](_0x52650f+':'+_0x42d885['id'],_0x42d885);FaxAccountEvents['emit'](_0x52650f,_0x42d885);_0x2dda00(null);};}for(var e in events){if(events[_0xb73c('0x6')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module['exports']=FaxAccountEvents;