Built motion from commit (unavailable).|2.5.13
[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 _0x06b1=['save','update','remove','emit','hasOwnProperty','exports','events','FaxAccount','setMaxListeners'];(function(_0x21a2b2,_0x22ba1e){var _0x2060b4=function(_0x38cfcb){while(--_0x38cfcb){_0x21a2b2['push'](_0x21a2b2['shift']());}};_0x2060b4(++_0x22ba1e);}(_0x06b1,0x10b));var _0x106b=function(_0x4a83ed,_0x25035e){_0x4a83ed=_0x4a83ed-0x0;var _0x23e004=_0x06b1[_0x4a83ed];return _0x23e004;};'use strict';var EventEmitter=require(_0x106b('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0x106b('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x106b('0x2')](0x0);var events={'afterCreate':_0x106b('0x3'),'afterUpdate':_0x106b('0x4'),'afterDestroy':_0x106b('0x5')};function emitEvent(_0x12a163){return function(_0x79f198,_0x9dd938,_0x1e4b03){FaxAccountEvents[_0x106b('0x6')](_0x12a163+':'+_0x79f198['id'],_0x79f198);FaxAccountEvents[_0x106b('0x6')](_0x12a163,_0x79f198);_0x1e4b03(null);};}for(var e in events){if(events[_0x106b('0x7')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0x106b('0x8')]=FaxAccountEvents;