Built motion from commit (unavailable).|2.5.17
[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 _0x98c9=['save','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','FaxAccount'];(function(_0x4f2515,_0x1e58bd){var _0x10d9c4=function(_0x2f6104){while(--_0x2f6104){_0x4f2515['push'](_0x4f2515['shift']());}};_0x10d9c4(++_0x1e58bd);}(_0x98c9,0x84));var _0x998c=function(_0x26f1b2,_0x33d843){_0x26f1b2=_0x26f1b2-0x0;var _0x1624a4=_0x98c9[_0x26f1b2];return _0x1624a4;};'use strict';var EventEmitter=require(_0x998c('0x0'));var FaxAccount=require(_0x998c('0x1'))['db'][_0x998c('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x998c('0x3'),'afterUpdate':_0x998c('0x4'),'afterDestroy':_0x998c('0x5')};function emitEvent(_0x277a9d){return function(_0x2e94de,_0x431acd,_0x4902da){FaxAccountEvents[_0x998c('0x6')](_0x277a9d+':'+_0x2e94de['id'],_0x2e94de);FaxAccountEvents[_0x998c('0x6')](_0x277a9d,_0x2e94de);_0x4902da(null);};}for(var e in events){if(events[_0x998c('0x7')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0x998c('0x8')]=FaxAccountEvents;