Built motion from commit d5e4af8c.|2.6.23
[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 _0x646e=['hasOwnProperty','exports','../../mysqldb','FaxAccount','save','emit'];(function(_0x2d123d,_0x33d75c){var _0x59e4f8=function(_0x52e357){while(--_0x52e357){_0x2d123d['push'](_0x2d123d['shift']());}};_0x59e4f8(++_0x33d75c);}(_0x646e,0xc2));var _0xe646=function(_0x45b2fc,_0x2bc1f5){_0x45b2fc=_0x45b2fc-0x0;var _0x44ccfd=_0x646e[_0x45b2fc];return _0x44ccfd;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0xe646('0x0'))['db'][_0xe646('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe646('0x2'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x2d32c1){return function(_0x4e9938,_0x31495d,_0x4d98db){FaxAccountEvents[_0xe646('0x3')](_0x2d32c1+':'+_0x4e9938['id'],_0x4e9938);FaxAccountEvents[_0xe646('0x3')](_0x2d32c1,_0x4e9938);_0x4d98db(null);};}for(var e in events){if(events[_0xe646('0x4')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0xe646('0x5')]=FaxAccountEvents;