Built motion from commit (unavailable).|2.5.24
[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 _0xb2ae=['SquareProject','setMaxListeners','save','emit','events','../../mysqldb'];(function(_0x3fce59,_0x1f450f){var _0x55397f=function(_0x1d29ee){while(--_0x1d29ee){_0x3fce59['push'](_0x3fce59['shift']());}};_0x55397f(++_0x1f450f);}(_0xb2ae,0x15a));var _0xeb2a=function(_0x43ac05,_0x108a82){_0x43ac05=_0x43ac05-0x0;var _0x4bb858=_0xb2ae[_0x43ac05];return _0x4bb858;};'use strict';var EventEmitter=require(_0xeb2a('0x0'));var SquareProject=require(_0xeb2a('0x1'))['db'][_0xeb2a('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xeb2a('0x3')](0x0);var events={'afterCreate':_0xeb2a('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x1cdd23){return function(_0xacd6a0,_0x39c664,_0x324686){SquareProjectEvents[_0xeb2a('0x5')](_0x1cdd23+':'+_0xacd6a0['id'],_0xacd6a0);SquareProjectEvents[_0xeb2a('0x5')](_0x1cdd23,_0xacd6a0);_0x324686(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module['exports']=SquareProjectEvents;