Built motion from commit 0c5f406c.|2.6.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 _0xe8db=['setMaxListeners','save','update','emit','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x37d835,_0x35c8dd){var _0x3b4cf6=function(_0x36c153){while(--_0x36c153){_0x37d835['push'](_0x37d835['shift']());}};_0x3b4cf6(++_0x35c8dd);}(_0xe8db,0x10e));var _0xbe8d=function(_0x4f6d08,_0x1b3dd0){_0x4f6d08=_0x4f6d08-0x0;var _0x53a9c6=_0xe8db[_0x4f6d08];return _0x53a9c6;};'use strict';var EventEmitter=require(_0xbe8d('0x0'));var SquareProject=require(_0xbe8d('0x1'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xbe8d('0x2')](0x0);var events={'afterCreate':_0xbe8d('0x3'),'afterUpdate':_0xbe8d('0x4'),'afterDestroy':'remove'};function emitEvent(_0x3f0ae9){return function(_0x408774,_0x3f5ef4,_0x6719fa){SquareProjectEvents[_0xbe8d('0x5')](_0x3f0ae9+':'+_0x408774['id'],_0x408774);SquareProjectEvents[_0xbe8d('0x5')](_0x3f0ae9,_0x408774);_0x6719fa(null);};}for(var e in events){if(events[_0xbe8d('0x6')](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module[_0xbe8d('0x7')]=SquareProjectEvents;