Built motion from commit (unavailable).|2.5.22
[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 _0xe9b7=['setMaxListeners','save','update','emit','hasOwnProperty','exports','../../mysqldb','FaxAccount'];(function(_0x10df18,_0x13338c){var _0x1f9a1d=function(_0x3157f4){while(--_0x3157f4){_0x10df18['push'](_0x10df18['shift']());}};_0x1f9a1d(++_0x13338c);}(_0xe9b7,0x96));var _0x7e9b=function(_0x324271,_0x59e968){_0x324271=_0x324271-0x0;var _0x31ef5a=_0xe9b7[_0x324271];return _0x31ef5a;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0x7e9b('0x0'))['db'][_0x7e9b('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x7e9b('0x2')](0x0);var events={'afterCreate':_0x7e9b('0x3'),'afterUpdate':_0x7e9b('0x4'),'afterDestroy':'remove'};function emitEvent(_0x3d3480){return function(_0x52db82,_0xb72834,_0x8f3564){FaxAccountEvents[_0x7e9b('0x5')](_0x3d3480+':'+_0x52db82['id'],_0x52db82);FaxAccountEvents['emit'](_0x3d3480,_0x52db82);_0x8f3564(null);};}for(var e in events){if(events[_0x7e9b('0x6')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0x7e9b('0x7')]=FaxAccountEvents;