Built motion from commit (unavailable).|2.5.13
[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 _0xa19a=['setMaxListeners','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxQueue'];(function(_0x2f9477,_0x2fbcee){var _0x5012e1=function(_0x22a56b){while(--_0x22a56b){_0x2f9477['push'](_0x2f9477['shift']());}};_0x5012e1(++_0x2fbcee);}(_0xa19a,0x165));var _0xaa19=function(_0x179f64,_0x4d478e){_0x179f64=_0x179f64-0x0;var _0x1d7e2e=_0xa19a[_0x179f64];return _0x1d7e2e;};'use strict';var EventEmitter=require(_0xaa19('0x0'));var FaxQueue=require(_0xaa19('0x1'))['db'][_0xaa19('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xaa19('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xaa19('0x4')};function emitEvent(_0x346d1b){return function(_0x1fb813,_0x5b7c89,_0x150b16){FaxQueueEvents[_0xaa19('0x5')](_0x346d1b+':'+_0x1fb813['id'],_0x1fb813);FaxQueueEvents[_0xaa19('0x5')](_0x346d1b,_0x1fb813);_0x150b16(null);};}for(var e in events){if(events[_0xaa19('0x6')](e)){var event=events[e];FaxQueue[_0xaa19('0x7')](e,emitEvent(event));}}module[_0xaa19('0x8')]=FaxQueueEvents;