Built motion from commit 3c2ce842.|2.6.31
[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 _0x28d6=['use','isAuthenticated','exports','beaver-logger/server','express','../components/auth/service','Router','env','production','get','expressEndpoint','/client-logs'];(function(_0x407844,_0x47eedc){var _0x36f5df=function(_0x31ee6d){while(--_0x31ee6d){_0x407844['push'](_0x407844['shift']());}};_0x36f5df(++_0x47eedc);}(_0x28d6,0xff));var _0x628d=function(_0x1e0139,_0x4970a3){_0x1e0139=_0x1e0139-0x0;var _0xbfc2ba=_0x28d6[_0x1e0139];return _0xbfc2ba;};var beaverLogger=require(_0x628d('0x0'));var express=require(_0x628d('0x1'));var auth=require(_0x628d('0x2'));var config=require('../config/environment');var router=express[_0x628d('0x3')]();var isProduction=config[_0x628d('0x4')]===_0x628d('0x5')||![];function clientSideLogs(_0x5d9008,_0x190721,_0x407b82){var _0x5b17d8=_0x5d9008['app'][_0x628d('0x6')]('client-side-logger');if(!_0x5b17d8){throw new Error('Client-Side\x20logger\x20not\x20found!');}return beaverLogger[_0x628d('0x7')]({'uri':_0x628d('0x8'),'logger':_0x5b17d8,'enableCors':!isProduction})(_0x5d9008,_0x190721,_0x407b82);}router[_0x628d('0x9')](auth[_0x628d('0xa')](),clientSideLogs);module[_0x628d('0xb')]=router;