Built motion from commit (unavailable).|2.5.6
[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 _0xe623=['remove','emit','../../mysqldb','SquareProject','setMaxListeners','save'];(function(_0x36d203,_0x3653f3){var _0x2f9e62=function(_0x461a77){while(--_0x461a77){_0x36d203['push'](_0x36d203['shift']());}};_0x2f9e62(++_0x3653f3);}(_0xe623,0x10a));var _0x3e62=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0xe623[_0x2d2c16];return _0x53f2fb;};'use strict';var EventEmitter=require('events');var SquareProject=require(_0x3e62('0x0'))['db'][_0x3e62('0x1')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0x3e62('0x2')](0x0);var events={'afterCreate':_0x3e62('0x3'),'afterUpdate':'update','afterDestroy':_0x3e62('0x4')};function emitEvent(_0x546d07){return function(_0x510296,_0x23d656,_0x6e3da4){SquareProjectEvents[_0x3e62('0x5')](_0x546d07+':'+_0x510296['id'],_0x510296);SquareProjectEvents[_0x3e62('0x5')](_0x546d07,_0x510296);_0x6e3da4(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module['exports']=SquareProjectEvents;