Built motion from commit (unavailable).|2.4.18
[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 _0xd17a=['exports','events','setMaxListeners','update','remove','emit','hasOwnProperty'];(function(_0x3511d3,_0x4107ae){var _0x5d6321=function(_0x1a23da){while(--_0x1a23da){_0x3511d3['push'](_0x3511d3['shift']());}};_0x5d6321(++_0x4107ae);}(_0xd17a,0x8d));var _0xad17=function(_0x2b365f,_0x17aa37){_0x2b365f=_0x2b365f-0x0;var _0x26b060=_0xd17a[_0x2b365f];return _0x26b060;};'use strict';var EventEmitter=require(_0xad17('0x0'));var FaxAccount=require('../../mysqldb')['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xad17('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xad17('0x2'),'afterDestroy':_0xad17('0x3')};function emitEvent(_0x1498c4){return function(_0x5c665c,_0x4c77b5,_0x547f85){FaxAccountEvents[_0xad17('0x4')](_0x1498c4+':'+_0x5c665c['id'],_0x5c665c);FaxAccountEvents[_0xad17('0x4')](_0x1498c4,_0x5c665c);_0x547f85(null);};}for(var e in events){if(events[_0xad17('0x5')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0xad17('0x6')]=FaxAccountEvents;