Built motion from commit da24aabd.|2.6.20
[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 _0x463d=['use','isAuthenticated','exports','beaver-logger/server','../components/auth/service','../config/environment','Router','env','production','get','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs'];(function(_0x12916d,_0x37865a){var _0x127b87=function(_0x57d8b9){while(--_0x57d8b9){_0x12916d['push'](_0x12916d['shift']());}};_0x127b87(++_0x37865a);}(_0x463d,0x107));var _0xd463=function(_0x31548a,_0x6aaa8a){_0x31548a=_0x31548a-0x0;var _0xb40221=_0x463d[_0x31548a];return _0xb40221;};var beaverLogger=require(_0xd463('0x0'));var express=require('express');var auth=require(_0xd463('0x1'));var config=require(_0xd463('0x2'));var router=express[_0xd463('0x3')]();var isProduction=config[_0xd463('0x4')]===_0xd463('0x5')||![];function clientSideLogs(_0x48664e,_0x4b1ea9,_0x2269b6){var _0x235d6e=_0x48664e['app'][_0xd463('0x6')]('client-side-logger');if(!_0x235d6e){throw new Error(_0xd463('0x7'));}return beaverLogger[_0xd463('0x8')]({'uri':_0xd463('0x9'),'logger':_0x235d6e,'enableCors':!isProduction})(_0x48664e,_0x4b1ea9,_0x2269b6);}router[_0xd463('0xa')](auth[_0xd463('0xb')](),clientSideLogs);module[_0xd463('0xc')]=router;