Built motion from commit 10af8726.|2.6.34
[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 _0x99c9=['exports','events','../../mysqldb','setMaxListeners','update','remove','emit','hasOwnProperty','hook'];(function(_0xc4b24b,_0x3a52b1){var _0x38cf3b=function(_0x15a1ca){while(--_0x15a1ca){_0xc4b24b['push'](_0xc4b24b['shift']());}};_0x38cf3b(++_0x3a52b1);}(_0x99c9,0x7f));var _0x999c=function(_0x5c2e3e,_0x26ecd3){_0x5c2e3e=_0x5c2e3e-0x0;var _0x53f64a=_0x99c9[_0x5c2e3e];return _0x53f64a;};'use strict';var EventEmitter=require(_0x999c('0x0'));var FaxAccount=require(_0x999c('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x999c('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x999c('0x3'),'afterDestroy':_0x999c('0x4')};function emitEvent(_0x4f9904){return function(_0x32fbda,_0x2d29d5,_0xb99915){FaxAccountEvents[_0x999c('0x5')](_0x4f9904+':'+_0x32fbda['id'],_0x32fbda);FaxAccountEvents[_0x999c('0x5')](_0x4f9904,_0x32fbda);_0xb99915(null);};}for(var e in events){if(events[_0x999c('0x6')](e)){var event=events[e];FaxAccount[_0x999c('0x7')](e,emitEvent(event));}}module[_0x999c('0x8')]=FaxAccountEvents;