682585662634266ed3998f2ebaa95b4a23beca6c
[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 _0x09d8=['express','../components/auth/service','Router','env','app','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint','use','isAuthenticated','exports','beaver-logger/server'];(function(_0x43fd0e,_0x419944){var _0xfee08c=function(_0xb2a177){while(--_0xb2a177){_0x43fd0e['push'](_0x43fd0e['shift']());}};_0xfee08c(++_0x419944);}(_0x09d8,0x1a3));var _0x809d=function(_0x3f4a73,_0x1c770b){_0x3f4a73=_0x3f4a73-0x0;var _0xb9de69=_0x09d8[_0x3f4a73];return _0xb9de69;};var beaverLogger=require(_0x809d('0x0'));var express=require(_0x809d('0x1'));var auth=require(_0x809d('0x2'));var config=require('../config/environment');var router=express[_0x809d('0x3')]();var isProduction=config[_0x809d('0x4')]==='production'||![];function clientSideLogs(_0x17efa4,_0x203b57,_0x91b634){var _0x1dc497=_0x17efa4[_0x809d('0x5')]['get'](_0x809d('0x6'));if(!_0x1dc497){throw new Error(_0x809d('0x7'));}return beaverLogger[_0x809d('0x8')]({'uri':'/client-logs','logger':_0x1dc497,'enableCors':!isProduction})(_0x17efa4,_0x203b57,_0x91b634);}router[_0x809d('0x9')](auth[_0x809d('0xa')](),clientSideLogs);module[_0x809d('0xb')]=router;