Built motion from commit 1fa89557.|2.6.10
[motion2.git] / server / api / faxQueue / faxQueue.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 _0xbc13=['remove','emit','hasOwnProperty','hook','events','../../mysqldb','FaxQueue','setMaxListeners','save'];(function(_0x395000,_0x171553){var _0xf109e3=function(_0x5b2517){while(--_0x5b2517){_0x395000['push'](_0x395000['shift']());}};_0xf109e3(++_0x171553);}(_0xbc13,0x124));var _0x3bc1=function(_0x1c0f41,_0x26d95d){_0x1c0f41=_0x1c0f41-0x0;var _0x369a9f=_0xbc13[_0x1c0f41];return _0x369a9f;};'use strict';var EventEmitter=require(_0x3bc1('0x0'));var FaxQueue=require(_0x3bc1('0x1'))['db'][_0x3bc1('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x3bc1('0x3')](0x0);var events={'afterCreate':_0x3bc1('0x4'),'afterUpdate':'update','afterDestroy':_0x3bc1('0x5')};function emitEvent(_0x587883){return function(_0x2ea985,_0x21f478,_0x23bef6){FaxQueueEvents[_0x3bc1('0x6')](_0x587883+':'+_0x2ea985['id'],_0x2ea985);FaxQueueEvents[_0x3bc1('0x6')](_0x587883,_0x2ea985);_0x23bef6(null);};}for(var e in events){if(events[_0x3bc1('0x7')](e)){var event=events[e];FaxQueue[_0x3bc1('0x8')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;