Built motion from commit (unavailable).|2.5.28
[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 _0x03d2=['remove','emit','hasOwnProperty','hook','events','../../mysqldb','FaxQueue','setMaxListeners','save'];(function(_0x2d30d2,_0x2c1714){var _0x5e3c11=function(_0x30981b){while(--_0x30981b){_0x2d30d2['push'](_0x2d30d2['shift']());}};_0x5e3c11(++_0x2c1714);}(_0x03d2,0x100));var _0x203d=function(_0x528bac,_0x2f1aef){_0x528bac=_0x528bac-0x0;var _0x5ba7c9=_0x03d2[_0x528bac];return _0x5ba7c9;};'use strict';var EventEmitter=require(_0x203d('0x0'));var FaxQueue=require(_0x203d('0x1'))['db'][_0x203d('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x203d('0x3')](0x0);var events={'afterCreate':_0x203d('0x4'),'afterUpdate':'update','afterDestroy':_0x203d('0x5')};function emitEvent(_0x2f9d07){return function(_0xe6aca9,_0x1b548a,_0x112ace){FaxQueueEvents['emit'](_0x2f9d07+':'+_0xe6aca9['id'],_0xe6aca9);FaxQueueEvents[_0x203d('0x6')](_0x2f9d07,_0xe6aca9);_0x112ace(null);};}for(var e in events){if(events[_0x203d('0x7')](e)){var event=events[e];FaxQueue[_0x203d('0x8')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;