1b9439734b84a4d361a51d63ea2979f743f7fc88
[motion2.git] / server / api / smsQueue / smsQueue.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 _0x8f01=['../../mysqldb','SmsQueue','setMaxListeners','save','remove','emit','hasOwnProperty','hook','events'];(function(_0x25d1c0,_0x3d69ff){var _0x35233a=function(_0x14731c){while(--_0x14731c){_0x25d1c0['push'](_0x25d1c0['shift']());}};_0x35233a(++_0x3d69ff);}(_0x8f01,0x143));var _0x18f0=function(_0x23e6bb,_0x5c2d69){_0x23e6bb=_0x23e6bb-0x0;var _0x1e3b4c=_0x8f01[_0x23e6bb];return _0x1e3b4c;};'use strict';var EventEmitter=require(_0x18f0('0x0'));var SmsQueue=require(_0x18f0('0x1'))['db'][_0x18f0('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x18f0('0x3')](0x0);var events={'afterCreate':_0x18f0('0x4'),'afterUpdate':'update','afterDestroy':_0x18f0('0x5')};function emitEvent(_0x590ab6){return function(_0xc275b7,_0x4db2e0,_0x328807){SmsQueueEvents[_0x18f0('0x6')](_0x590ab6+':'+_0xc275b7['id'],_0xc275b7);SmsQueueEvents['emit'](_0x590ab6,_0xc275b7);_0x328807(null);};}for(var e in events){if(events[_0x18f0('0x7')](e)){var event=events[e];SmsQueue[_0x18f0('0x8')](e,emitEvent(event));}}module['exports']=SmsQueueEvents;