13c2f61db303d73cc6ef645b93d78d1483d4762b
[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 _0xd288=['isAuthenticated','exports','express','../components/auth/service','../config/environment','Router','env','app','get','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs','use'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xd288,0x161));var _0x8d28=function(_0x2e22b3,_0x304d42){_0x2e22b3=_0x2e22b3-0x0;var _0x1e6347=_0xd288[_0x2e22b3];return _0x1e6347;};var beaverLogger=require('beaver-logger/server');var express=require(_0x8d28('0x0'));var auth=require(_0x8d28('0x1'));var config=require(_0x8d28('0x2'));var router=express[_0x8d28('0x3')]();var isProduction=config[_0x8d28('0x4')]==='production'||![];function clientSideLogs(_0x22ed55,_0x271e76,_0x19cdd2){var _0x5877bc=_0x22ed55[_0x8d28('0x5')][_0x8d28('0x6')]('client-side-logger');if(!_0x5877bc){throw new Error(_0x8d28('0x7'));}return beaverLogger[_0x8d28('0x8')]({'uri':_0x8d28('0x9'),'logger':_0x5877bc,'enableCors':!isProduction})(_0x22ed55,_0x271e76,_0x19cdd2);}router[_0x8d28('0xa')](auth[_0x8d28('0xb')](),clientSideLogs);module[_0x8d28('0xc')]=router;