Built motion from commit 775e2a94.|2.6.3
[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 _0x7c7d=['remove','emit','hasOwnProperty','exports','events','../../mysqldb','FaxAccount','setMaxListeners','save','update'];(function(_0x2049aa,_0x30b6de){var _0x59b4a9=function(_0x128fdd){while(--_0x128fdd){_0x2049aa['push'](_0x2049aa['shift']());}};_0x59b4a9(++_0x30b6de);}(_0x7c7d,0x158));var _0xd7c7=function(_0x42103d,_0x2e28c9){_0x42103d=_0x42103d-0x0;var _0x5a8261=_0x7c7d[_0x42103d];return _0x5a8261;};'use strict';var EventEmitter=require(_0xd7c7('0x0'));var FaxAccount=require(_0xd7c7('0x1'))['db'][_0xd7c7('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xd7c7('0x3')](0x0);var events={'afterCreate':_0xd7c7('0x4'),'afterUpdate':_0xd7c7('0x5'),'afterDestroy':_0xd7c7('0x6')};function emitEvent(_0x5273c7){return function(_0x2f2a7f,_0x352fb7,_0x55a7ed){FaxAccountEvents['emit'](_0x5273c7+':'+_0x2f2a7f['id'],_0x2f2a7f);FaxAccountEvents[_0xd7c7('0x7')](_0x5273c7,_0x2f2a7f);_0x55a7ed(null);};}for(var e in events){if(events[_0xd7c7('0x8')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0xd7c7('0x9')]=FaxAccountEvents;