Built motion from commit (unavailable).|2.5.26
[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 _0x93f6=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','FaxAccount'];(function(_0x4127e6,_0xbf2204){var _0x3f9211=function(_0x4cd4bc){while(--_0x4cd4bc){_0x4127e6['push'](_0x4127e6['shift']());}};_0x3f9211(++_0xbf2204);}(_0x93f6,0xc6));var _0x693f=function(_0x47e324,_0x4ed470){_0x47e324=_0x47e324-0x0;var _0x3a733c=_0x93f6[_0x47e324];return _0x3a733c;};'use strict';var EventEmitter=require(_0x693f('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0x693f('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x693f('0x2')](0x0);var events={'afterCreate':_0x693f('0x3'),'afterUpdate':_0x693f('0x4'),'afterDestroy':_0x693f('0x5')};function emitEvent(_0x15ebdd){return function(_0x3345e2,_0xf57b95,_0x5c766d){FaxAccountEvents[_0x693f('0x6')](_0x15ebdd+':'+_0x3345e2['id'],_0x3345e2);FaxAccountEvents['emit'](_0x15ebdd,_0x3345e2);_0x5c766d(null);};}for(var e in events){if(events[_0x693f('0x7')](e)){var event=events[e];FaxAccount[_0x693f('0x8')](e,emitEvent(event));}}module[_0x693f('0x9')]=FaxAccountEvents;