62f8d665ff187910805700550a3ef31387814719
[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 _0x57f5=['remove','emit','../../mysqldb','update'];(function(_0x1db998,_0x3c3f0c){var _0x56ca68=function(_0xf496d3){while(--_0xf496d3){_0x1db998['push'](_0x1db998['shift']());}};_0x56ca68(++_0x3c3f0c);}(_0x57f5,0x192));var _0x557f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x57f5[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require('events');var SquareProject=require(_0x557f('0x0'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x557f('0x1'),'afterDestroy':_0x557f('0x2')};function emitEvent(_0xfc3ba1){return function(_0x5e91ab,_0x2299fc,_0x4cd973){SquareProjectEvents['emit'](_0xfc3ba1+':'+_0x5e91ab['id'],_0x5e91ab);SquareProjectEvents[_0x557f('0x3')](_0xfc3ba1,_0x5e91ab);_0x4cd973(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module['exports']=SquareProjectEvents;