Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / openchannelAccount / openchannelAccount.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 _0xe344=['OpenchannelAccount','emit','hasOwnProperty','hook','exports'];(function(_0x584683,_0x46a0a4){var _0x57bbf4=function(_0x3180c6){while(--_0x3180c6){_0x584683['push'](_0x584683['shift']());}};_0x57bbf4(++_0x46a0a4);}(_0xe344,0x163));var _0x4e34=function(_0x9346df,_0x1ff6f0){_0x9346df=_0x9346df-0x0;var _0x2ce193=_0xe344[_0x9346df];return _0x2ce193;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require('../../mysqldb')['db'][_0x4e34('0x0')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x538b5d){return function(_0x18358f,_0x484ce1,_0xe2588e){OpenchannelAccountEvents[_0x4e34('0x1')](_0x538b5d+':'+_0x18358f['id'],_0x18358f);OpenchannelAccountEvents[_0x4e34('0x1')](_0x538b5d,_0x18358f);_0xe2588e(null);};}for(var e in events){if(events[_0x4e34('0x2')](e)){var event=events[e];OpenchannelAccount[_0x4e34('0x3')](e,emitEvent(event));}}module[_0x4e34('0x4')]=OpenchannelAccountEvents;