Built motion from commit 5ae82ce5.|2.6.7
[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 _0x13a0=['setMaxListeners','save','remove','hook','exports','../../mysqldb','FaxAccount'];(function(_0x334a94,_0x26b6d1){var _0x1db170=function(_0x5ee6d8){while(--_0x5ee6d8){_0x334a94['push'](_0x334a94['shift']());}};_0x1db170(++_0x26b6d1);}(_0x13a0,0x1cc));var _0x013a=function(_0x4bb145,_0x3e7d33){_0x4bb145=_0x4bb145-0x0;var _0x4db596=_0x13a0[_0x4bb145];return _0x4db596;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0x013a('0x0'))['db'][_0x013a('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x013a('0x2')](0x0);var events={'afterCreate':_0x013a('0x3'),'afterUpdate':'update','afterDestroy':_0x013a('0x4')};function emitEvent(_0x4f79c2){return function(_0x395416,_0x5025e3,_0x41c510){FaxAccountEvents['emit'](_0x4f79c2+':'+_0x395416['id'],_0x395416);FaxAccountEvents['emit'](_0x4f79c2,_0x395416);_0x41c510(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount[_0x013a('0x5')](e,emitEvent(event));}}module[_0x013a('0x6')]=FaxAccountEvents;