Built motion from commit 9d7072cc.|2.5.39
[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 _0x0ffd=['save','update','emit','hasOwnProperty','hook','events','../../mysqldb','FaxAccount','setMaxListeners'];(function(_0x173237,_0x1df0d5){var _0x1cd581=function(_0x1c00a9){while(--_0x1c00a9){_0x173237['push'](_0x173237['shift']());}};_0x1cd581(++_0x1df0d5);}(_0x0ffd,0x19a));var _0xd0ff=function(_0x4d8ed9,_0x2ae284){_0x4d8ed9=_0x4d8ed9-0x0;var _0x1e2140=_0x0ffd[_0x4d8ed9];return _0x1e2140;};'use strict';var EventEmitter=require(_0xd0ff('0x0'));var FaxAccount=require(_0xd0ff('0x1'))['db'][_0xd0ff('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xd0ff('0x3')](0x0);var events={'afterCreate':_0xd0ff('0x4'),'afterUpdate':_0xd0ff('0x5'),'afterDestroy':'remove'};function emitEvent(_0x1e3db3){return function(_0x599541,_0x210a13,_0x4b9b32){FaxAccountEvents[_0xd0ff('0x6')](_0x1e3db3+':'+_0x599541['id'],_0x599541);FaxAccountEvents[_0xd0ff('0x6')](_0x1e3db3,_0x599541);_0x4b9b32(null);};}for(var e in events){if(events[_0xd0ff('0x7')](e)){var event=events[e];FaxAccount[_0xd0ff('0x8')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;