Built motion from commit 9d0783e6.|2.6.13
[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 _0x491e=['isAuthenticated','express','../components/auth/service','../config/environment','env','production','app','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs','use'];(function(_0x88cd7b,_0x4c884c){var _0x56fcc8=function(_0x513b3d){while(--_0x513b3d){_0x88cd7b['push'](_0x88cd7b['shift']());}};_0x56fcc8(++_0x4c884c);}(_0x491e,0x140));var _0xe491=function(_0x15876a,_0x15383d){_0x15876a=_0x15876a-0x0;var _0xbd900f=_0x491e[_0x15876a];return _0xbd900f;};var beaverLogger=require('beaver-logger/server');var express=require(_0xe491('0x0'));var auth=require(_0xe491('0x1'));var config=require(_0xe491('0x2'));var router=express['Router']();var isProduction=config[_0xe491('0x3')]===_0xe491('0x4')||![];function clientSideLogs(_0x11ff5b,_0x4ceac0,_0x1ca6ff){var _0x481313=_0x11ff5b[_0xe491('0x5')]['get']('client-side-logger');if(!_0x481313){throw new Error(_0xe491('0x6'));}return beaverLogger[_0xe491('0x7')]({'uri':_0xe491('0x8'),'logger':_0x481313,'enableCors':!isProduction})(_0x11ff5b,_0x4ceac0,_0x1ca6ff);}router[_0xe491('0x9')](auth[_0xe491('0xa')](),clientSideLogs);module['exports']=router;