Built motion from commit (unavailable).|2.5.0
[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 _0x331f=['events','../../mysqldb','update','remove','emit','hasOwnProperty'];(function(_0x47aa64,_0xfb8a07){var _0x549c7a=function(_0x266165){while(--_0x266165){_0x47aa64['push'](_0x47aa64['shift']());}};_0x549c7a(++_0xfb8a07);}(_0x331f,0xc6));var _0xf331=function(_0x25a214,_0x59edf8){_0x25a214=_0x25a214-0x0;var _0x3180ea=_0x331f[_0x25a214];return _0x3180ea;};'use strict';var EventEmitter=require(_0xf331('0x0'));var FaxAccount=require(_0xf331('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xf331('0x2'),'afterDestroy':_0xf331('0x3')};function emitEvent(_0x3c9cc0){return function(_0x22b98c,_0x496093,_0x33406c){FaxAccountEvents[_0xf331('0x4')](_0x3c9cc0+':'+_0x22b98c['id'],_0x22b98c);FaxAccountEvents['emit'](_0x3c9cc0,_0x22b98c);_0x33406c(null);};}for(var e in events){if(events[_0xf331('0x5')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module['exports']=FaxAccountEvents;