Built motion from commit (unavailable).|2.5.21
[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 _0x811c=['save','emit','exports','events','../../mysqldb','FaxQueue','setMaxListeners'];(function(_0x195b14,_0x2f8fda){var _0x378f4b=function(_0x56bcfd){while(--_0x56bcfd){_0x195b14['push'](_0x195b14['shift']());}};_0x378f4b(++_0x2f8fda);}(_0x811c,0x81));var _0xc811=function(_0x2f13ed,_0xf2f62b){_0x2f13ed=_0x2f13ed-0x0;var _0x218bdc=_0x811c[_0x2f13ed];return _0x218bdc;};'use strict';var EventEmitter=require(_0xc811('0x0'));var FaxQueue=require(_0xc811('0x1'))['db'][_0xc811('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xc811('0x3')](0x0);var events={'afterCreate':_0xc811('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x27563f){return function(_0x56d0b6,_0x34049d,_0x3cae4e){FaxQueueEvents[_0xc811('0x5')](_0x27563f+':'+_0x56d0b6['id'],_0x56d0b6);FaxQueueEvents['emit'](_0x27563f,_0x56d0b6);_0x3cae4e(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xc811('0x6')]=FaxQueueEvents;