Built motion from commit 06eb8eb0.|2.6.31
[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 _0xa370=['beaver-logger/server','express','../components/auth/service','../config/environment','Router','env','production','get','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint','use','exports'];(function(_0x80d25e,_0x847670){var _0x51d35c=function(_0x327602){while(--_0x327602){_0x80d25e['push'](_0x80d25e['shift']());}};_0x51d35c(++_0x847670);}(_0xa370,0x75));var _0x0a37=function(_0x2eb298,_0x223aa0){_0x2eb298=_0x2eb298-0x0;var _0x4927ad=_0xa370[_0x2eb298];return _0x4927ad;};var beaverLogger=require(_0x0a37('0x0'));var express=require(_0x0a37('0x1'));var auth=require(_0x0a37('0x2'));var config=require(_0x0a37('0x3'));var router=express[_0x0a37('0x4')]();var isProduction=config[_0x0a37('0x5')]===_0x0a37('0x6')||![];function clientSideLogs(_0x2cc531,_0x2bb636,_0x3691e0){var _0x3408db=_0x2cc531['app'][_0x0a37('0x7')](_0x0a37('0x8'));if(!_0x3408db){throw new Error(_0x0a37('0x9'));}return beaverLogger[_0x0a37('0xa')]({'uri':'/client-logs','logger':_0x3408db,'enableCors':!isProduction})(_0x2cc531,_0x2bb636,_0x3691e0);}router[_0x0a37('0xb')](auth['isAuthenticated'](),clientSideLogs);module[_0x0a37('0xc')]=router;