a7511cc931b1660ab8efdd1b8b0d8de4bbba578a
[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 _0x49f5=['setMaxListeners','update','remove','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x4defd6,_0x37bbd3){var _0x4c9276=function(_0x1d7a3d){while(--_0x1d7a3d){_0x4defd6['push'](_0x4defd6['shift']());}};_0x4c9276(++_0x37bbd3);}(_0x49f5,0xc6));var _0x549f=function(_0x343493,_0x2b85bc){_0x343493=_0x343493-0x0;var _0x11776a=_0x49f5[_0x343493];return _0x11776a;};'use strict';var EventEmitter=require(_0x549f('0x0'));var FaxQueue=require(_0x549f('0x1'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x549f('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x549f('0x3'),'afterDestroy':_0x549f('0x4')};function emitEvent(_0x308676){return function(_0x267ccd,_0x110362,_0x49a6b5){FaxQueueEvents['emit'](_0x308676+':'+_0x267ccd['id'],_0x267ccd);FaxQueueEvents['emit'](_0x308676,_0x267ccd);_0x49a6b5(null);};}for(var e in events){if(events[_0x549f('0x5')](e)){var event=events[e];FaxQueue[_0x549f('0x6')](e,emitEvent(event));}}module[_0x549f('0x7')]=FaxQueueEvents;