Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / client-side-logs.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 _0xf550=['expressEndpoint','/client-logs','use','isAuthenticated','exports','beaver-logger/server','express','Router','env','production','app','client-side-logger','Client-Side\x20logger\x20not\x20found!'];(function(_0x14767e,_0x33a047){var _0x2abce9=function(_0x5527b4){while(--_0x5527b4){_0x14767e['push'](_0x14767e['shift']());}};_0x2abce9(++_0x33a047);}(_0xf550,0x1d9));var _0x0f55=function(_0x53f402,_0x326920){_0x53f402=_0x53f402-0x0;var _0x45a76d=_0xf550[_0x53f402];return _0x45a76d;};var beaverLogger=require(_0x0f55('0x0'));var express=require(_0x0f55('0x1'));var auth=require('../components/auth/service');var config=require('../config/environment');var router=express[_0x0f55('0x2')]();var isProduction=config[_0x0f55('0x3')]===_0x0f55('0x4')||![];function clientSideLogs(_0x5e59ac,_0x44e3bc,_0x24f0ac){var _0x3c3e52=_0x5e59ac[_0x0f55('0x5')]['get'](_0x0f55('0x6'));if(!_0x3c3e52){throw new Error(_0x0f55('0x7'));}return beaverLogger[_0x0f55('0x8')]({'uri':_0x0f55('0x9'),'logger':_0x3c3e52,'enableCors':!isProduction})(_0x5e59ac,_0x44e3bc,_0x24f0ac);}router[_0x0f55('0xa')](auth[_0x0f55('0xb')](),clientSideLogs);module[_0x0f55('0xc')]=router;