89af98e9c444b9c67f208771e968da4229a0eb47
[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 _0x8d16=['/client-logs','use','exports','beaver-logger/server','../components/auth/service','../config/environment','Router','production','app','get','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8d16,0xac));var _0x68d1=function(_0xcfc351,_0x583af5){_0xcfc351=_0xcfc351-0x0;var _0x2f1e74=_0x8d16[_0xcfc351];return _0x2f1e74;};var beaverLogger=require(_0x68d1('0x0'));var express=require('express');var auth=require(_0x68d1('0x1'));var config=require(_0x68d1('0x2'));var router=express[_0x68d1('0x3')]();var isProduction=config['env']===_0x68d1('0x4')||![];function clientSideLogs(_0x159c69,_0x239eb5,_0x350e3d){var _0x227d4b=_0x159c69[_0x68d1('0x5')][_0x68d1('0x6')](_0x68d1('0x7'));if(!_0x227d4b){throw new Error(_0x68d1('0x8'));}return beaverLogger[_0x68d1('0x9')]({'uri':_0x68d1('0xa'),'logger':_0x227d4b,'enableCors':!isProduction})(_0x159c69,_0x239eb5,_0x350e3d);}router[_0x68d1('0xb')](auth['isAuthenticated'](),clientSideLogs);module[_0x68d1('0xc')]=router;