Built motion from commit e38a297d.|2.6.18
[motion2.git] / server / api / faxAccount / faxAccount.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 _0x0519=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','save','update','remove'];(function(_0x24e7d3,_0x46f920){var _0x3db220=function(_0x4d6ed5){while(--_0x4d6ed5){_0x24e7d3['push'](_0x24e7d3['shift']());}};_0x3db220(++_0x46f920);}(_0x0519,0x16c));var _0x9051=function(_0x4ae625,_0xf396d0){_0x4ae625=_0x4ae625-0x0;var _0x31accf=_0x0519[_0x4ae625];return _0x31accf;};'use strict';var EventEmitter=require(_0x9051('0x0'));var FaxAccount=require(_0x9051('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9051('0x2'),'afterUpdate':_0x9051('0x3'),'afterDestroy':_0x9051('0x4')};function emitEvent(_0x1429db){return function(_0x293648,_0x4c3641,_0x374005){FaxAccountEvents['emit'](_0x1429db+':'+_0x293648['id'],_0x293648);FaxAccountEvents[_0x9051('0x5')](_0x1429db,_0x293648);_0x374005(null);};}for(var e in events){if(events[_0x9051('0x6')](e)){var event=events[e];FaxAccount[_0x9051('0x7')](e,emitEvent(event));}}module[_0x9051('0x8')]=FaxAccountEvents;