Built motion from commit (unavailable).|2.5.13
[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 _0xa6b3=['hasOwnProperty','exports','../../mysqldb','setMaxListeners','update','remove','emit'];(function(_0x1010df,_0x1b03a1){var _0xc6796c=function(_0x3655dd){while(--_0x3655dd){_0x1010df['push'](_0x1010df['shift']());}};_0xc6796c(++_0x1b03a1);}(_0xa6b3,0x72));var _0x3a6b=function(_0x14732f,_0x55f54c){_0x14732f=_0x14732f-0x0;var _0x118786=_0xa6b3[_0x14732f];return _0x118786;};'use strict';var EventEmitter=require('events');var SquareProject=require(_0x3a6b('0x0'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0x3a6b('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x3a6b('0x2'),'afterDestroy':_0x3a6b('0x3')};function emitEvent(_0x598f6d){return function(_0xe1e195,_0x478809,_0x1d4182){SquareProjectEvents[_0x3a6b('0x4')](_0x598f6d+':'+_0xe1e195['id'],_0xe1e195);SquareProjectEvents[_0x3a6b('0x4')](_0x598f6d,_0xe1e195);_0x1d4182(null);};}for(var e in events){if(events[_0x3a6b('0x5')](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module[_0x3a6b('0x6')]=SquareProjectEvents;