7d8dc9ec170ae04bb99f2a559229c30e2b7164cb
[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 _0x5dbd=['save','update','emit','hasOwnProperty','hook','events','../../mysqldb','setMaxListeners'];(function(_0x5d1f42,_0x1d4194){var _0x30bcc6=function(_0x45cd65){while(--_0x45cd65){_0x5d1f42['push'](_0x5d1f42['shift']());}};_0x30bcc6(++_0x1d4194);}(_0x5dbd,0x9d));var _0xd5db=function(_0x324afe,_0x44abf5){_0x324afe=_0x324afe-0x0;var _0x127e86=_0x5dbd[_0x324afe];return _0x127e86;};'use strict';var EventEmitter=require(_0xd5db('0x0'));var FaxAccount=require(_0xd5db('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xd5db('0x2')](0x0);var events={'afterCreate':_0xd5db('0x3'),'afterUpdate':_0xd5db('0x4'),'afterDestroy':'remove'};function emitEvent(_0x3504d6){return function(_0x1b8337,_0x3f4ccb,_0x331917){FaxAccountEvents[_0xd5db('0x5')](_0x3504d6+':'+_0x1b8337['id'],_0x1b8337);FaxAccountEvents[_0xd5db('0x5')](_0x3504d6,_0x1b8337);_0x331917(null);};}for(var e in events){if(events[_0xd5db('0x6')](e)){var event=events[e];FaxAccount[_0xd5db('0x7')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;