Built motion from commit (unavailable).|2.5.29
[motion2.git] / server / api / squareProject / squareProject.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 _0x60cb=['../../mysqldb','SquareProject','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x4fecd7,_0x2e35c1){var _0x246e95=function(_0x48eef6){while(--_0x48eef6){_0x4fecd7['push'](_0x4fecd7['shift']());}};_0x246e95(++_0x2e35c1);}(_0x60cb,0xd8));var _0xb60c=function(_0x15c814,_0x1bbd19){_0x15c814=_0x15c814-0x0;var _0x3d94a2=_0x60cb[_0x15c814];return _0x3d94a2;};'use strict';var EventEmitter=require('events');var SquareProject=require(_0xb60c('0x0'))['db'][_0xb60c('0x1')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb60c('0x2'),'afterUpdate':_0xb60c('0x3'),'afterDestroy':_0xb60c('0x4')};function emitEvent(_0xbef0da){return function(_0x3c621c,_0x2eedc0,_0x5598e3){SquareProjectEvents[_0xb60c('0x5')](_0xbef0da+':'+_0x3c621c['id'],_0x3c621c);SquareProjectEvents[_0xb60c('0x5')](_0xbef0da,_0x3c621c);_0x5598e3(null);};}for(var e in events){if(events[_0xb60c('0x6')](e)){var event=events[e];SquareProject[_0xb60c('0x7')](e,emitEvent(event));}}module[_0xb60c('0x8')]=SquareProjectEvents;