Built motion from commit d1eab355.|2.6.28
[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 _0xcd22=['/client-logs','use','isAuthenticated','exports','beaver-logger/server','express','../components/auth/service','../config/environment','Router','env','production','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint'];(function(_0x209941,_0x5c9988){var _0x1e8729=function(_0x51a9b8){while(--_0x51a9b8){_0x209941['push'](_0x209941['shift']());}};_0x1e8729(++_0x5c9988);}(_0xcd22,0x162));var _0x2cd2=function(_0x50f112,_0xd38e53){_0x50f112=_0x50f112-0x0;var _0x4ecf28=_0xcd22[_0x50f112];return _0x4ecf28;};var beaverLogger=require(_0x2cd2('0x0'));var express=require(_0x2cd2('0x1'));var auth=require(_0x2cd2('0x2'));var config=require(_0x2cd2('0x3'));var router=express[_0x2cd2('0x4')]();var isProduction=config[_0x2cd2('0x5')]===_0x2cd2('0x6')||![];function clientSideLogs(_0x440a89,_0x1e3459,_0xcdcf21){var _0x119595=_0x440a89['app']['get'](_0x2cd2('0x7'));if(!_0x119595){throw new Error(_0x2cd2('0x8'));}return beaverLogger[_0x2cd2('0x9')]({'uri':_0x2cd2('0xa'),'logger':_0x119595,'enableCors':!isProduction})(_0x440a89,_0x1e3459,_0xcdcf21);}router[_0x2cd2('0xb')](auth[_0x2cd2('0xc')](),clientSideLogs);module[_0x2cd2('0xd')]=router;