Built motion from commit 64a6f4bc.|2.6.26
[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 _0x00ea=['update','remove','emit','hasOwnProperty','hook','../../mysqldb','FaxAccount','save'];(function(_0x22ad4b,_0x4671d9){var _0x53094c=function(_0x29e448){while(--_0x29e448){_0x22ad4b['push'](_0x22ad4b['shift']());}};_0x53094c(++_0x4671d9);}(_0x00ea,0x19d));var _0xa00e=function(_0x2f0e88,_0x2158c0){_0x2f0e88=_0x2f0e88-0x0;var _0x493b77=_0x00ea[_0x2f0e88];return _0x493b77;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0xa00e('0x0'))['db'][_0xa00e('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xa00e('0x2'),'afterUpdate':_0xa00e('0x3'),'afterDestroy':_0xa00e('0x4')};function emitEvent(_0x13953b){return function(_0x2659c4,_0x415ff9,_0x5a2c55){FaxAccountEvents[_0xa00e('0x5')](_0x13953b+':'+_0x2659c4['id'],_0x2659c4);FaxAccountEvents[_0xa00e('0x5')](_0x13953b,_0x2659c4);_0x5a2c55(null);};}for(var e in events){if(events[_0xa00e('0x6')](e)){var event=events[e];FaxAccount[_0xa00e('0x7')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;