Built motion from commit (unavailable).|2.4.18
[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 _0x37f5=['emit','hasOwnProperty','exports','../../mysqldb','setMaxListeners','save','update','remove'];(function(_0x2dd849,_0x3bd1bf){var _0x38ba4e=function(_0xd89ddc){while(--_0xd89ddc){_0x2dd849['push'](_0x2dd849['shift']());}};_0x38ba4e(++_0x3bd1bf);}(_0x37f5,0x7b));var _0x537f=function(_0x39d0ff,_0x1f59e3){_0x39d0ff=_0x39d0ff-0x0;var _0x29d57c=_0x37f5[_0x39d0ff];return _0x29d57c;};'use strict';var EventEmitter=require('events');var SquareProject=require(_0x537f('0x0'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0x537f('0x1')](0x0);var events={'afterCreate':_0x537f('0x2'),'afterUpdate':_0x537f('0x3'),'afterDestroy':_0x537f('0x4')};function emitEvent(_0x762044){return function(_0x4f2430,_0x576cb0,_0x2c8778){SquareProjectEvents[_0x537f('0x5')](_0x762044+':'+_0x4f2430['id'],_0x4f2430);SquareProjectEvents[_0x537f('0x5')](_0x762044,_0x4f2430);_0x2c8778(null);};}for(var e in events){if(events[_0x537f('0x6')](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module[_0x537f('0x7')]=SquareProjectEvents;