Built motion from commit 1fa89557.|2.6.10
[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 _0x17b2=['express','../components/auth/service','../config/environment','Router','production','app','get','client-side-logger','expressEndpoint','/client-logs','isAuthenticated','exports','beaver-logger/server'];(function(_0x4c3266,_0x80300c){var _0x59e05a=function(_0x39dc1c){while(--_0x39dc1c){_0x4c3266['push'](_0x4c3266['shift']());}};_0x59e05a(++_0x80300c);}(_0x17b2,0xcf));var _0x217b=function(_0x2d7193,_0x34ca19){_0x2d7193=_0x2d7193-0x0;var _0x1d5a51=_0x17b2[_0x2d7193];return _0x1d5a51;};var beaverLogger=require(_0x217b('0x0'));var express=require(_0x217b('0x1'));var auth=require(_0x217b('0x2'));var config=require(_0x217b('0x3'));var router=express[_0x217b('0x4')]();var isProduction=config['env']===_0x217b('0x5')||![];function clientSideLogs(_0x53162c,_0x468c55,_0x3bec8){var _0x2c0c19=_0x53162c[_0x217b('0x6')][_0x217b('0x7')](_0x217b('0x8'));if(!_0x2c0c19){throw new Error('Client-Side\x20logger\x20not\x20found!');}return beaverLogger[_0x217b('0x9')]({'uri':_0x217b('0xa'),'logger':_0x2c0c19,'enableCors':!isProduction})(_0x53162c,_0x468c55,_0x3bec8);}router['use'](auth[_0x217b('0xb')](),clientSideLogs);module[_0x217b('0xc')]=router;