Built motion from commit (unavailable).|2.4.18
[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 _0x6719=['FaxAccount','setMaxListeners','save','emit','hasOwnProperty','hook','events','../../mysqldb'];(function(_0x3c8e9a,_0x384306){var _0x2d4c57=function(_0x43d408){while(--_0x43d408){_0x3c8e9a['push'](_0x3c8e9a['shift']());}};_0x2d4c57(++_0x384306);}(_0x6719,0x116));var _0x9671=function(_0x15b399,_0x59db1a){_0x15b399=_0x15b399-0x0;var _0x199f2d=_0x6719[_0x15b399];return _0x199f2d;};'use strict';var EventEmitter=require(_0x9671('0x0'));var FaxAccount=require(_0x9671('0x1'))['db'][_0x9671('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x9671('0x3')](0x0);var events={'afterCreate':_0x9671('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x3b931b){return function(_0x1ec2c3,_0xfbb8d6,_0x23f93f){FaxAccountEvents[_0x9671('0x5')](_0x3b931b+':'+_0x1ec2c3['id'],_0x1ec2c3);FaxAccountEvents[_0x9671('0x5')](_0x3b931b,_0x1ec2c3);_0x23f93f(null);};}for(var e in events){if(events[_0x9671('0x6')](e)){var event=events[e];FaxAccount[_0x9671('0x7')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;