Built motion from commit (unavailable).|2.3.4
[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 _0xea03=['hook','exports','../../mysqldb','setMaxListeners','update','remove','emit','hasOwnProperty'];(function(_0x58c851,_0x1f3d96){var _0x534d8a=function(_0x10c1a0){while(--_0x10c1a0){_0x58c851['push'](_0x58c851['shift']());}};_0x534d8a(++_0x1f3d96);}(_0xea03,0x172));var _0x3ea0=function(_0x2749b8,_0x570e1c){_0x2749b8=_0x2749b8-0x0;var _0x589657=_0xea03[_0x2749b8];return _0x589657;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0x3ea0('0x0'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x3ea0('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x3ea0('0x2'),'afterDestroy':_0x3ea0('0x3')};function emitEvent(_0x56032a){return function(_0x330743,_0x101393,_0x326d26){FaxAccountEvents[_0x3ea0('0x4')](_0x56032a+':'+_0x330743['id'],_0x330743);FaxAccountEvents[_0x3ea0('0x4')](_0x56032a,_0x330743);_0x326d26(null);};}for(var e in events){if(events[_0x3ea0('0x5')](e)){var event=events[e];FaxAccount[_0x3ea0('0x6')](e,emitEvent(event));}}module[_0x3ea0('0x7')]=FaxAccountEvents;