Built motion from commit 598073ad.|2.5.44
[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 _0xe99a=['FaxQueue','setMaxListeners','update','remove','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x5bd1a9,_0x313714){var _0x2ba345=function(_0x21b4af){while(--_0x21b4af){_0x5bd1a9['push'](_0x5bd1a9['shift']());}};_0x2ba345(++_0x313714);}(_0xe99a,0x1e4));var _0xae99=function(_0x52f3ac,_0x54b711){_0x52f3ac=_0x52f3ac-0x0;var _0x7d365d=_0xe99a[_0x52f3ac];return _0x7d365d;};'use strict';var EventEmitter=require(_0xae99('0x0'));var FaxQueue=require(_0xae99('0x1'))['db'][_0xae99('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xae99('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xae99('0x4'),'afterDestroy':_0xae99('0x5')};function emitEvent(_0x45b501){return function(_0x486c51,_0x2ea001,_0x3b9998){FaxQueueEvents['emit'](_0x45b501+':'+_0x486c51['id'],_0x486c51);FaxQueueEvents['emit'](_0x45b501,_0x486c51);_0x3b9998(null);};}for(var e in events){if(events[_0xae99('0x6')](e)){var event=events[e];FaxQueue[_0xae99('0x7')](e,emitEvent(event));}}module[_0xae99('0x8')]=FaxQueueEvents;