Built motion from commit 0900f080.|2.5.45
[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 _0x4f50=['isAuthenticated','beaver-logger/server','express','../components/auth/service','../config/environment','Router','env','production','get','client-side-logger','Client-Side\x20logger\x20not\x20found!','/client-logs','use'];(function(_0x21549c,_0x6d64d1){var _0x426cbd=function(_0x323f5b){while(--_0x323f5b){_0x21549c['push'](_0x21549c['shift']());}};_0x426cbd(++_0x6d64d1);}(_0x4f50,0x12c));var _0x04f5=function(_0x102b50,_0x536173){_0x102b50=_0x102b50-0x0;var _0x4a6749=_0x4f50[_0x102b50];return _0x4a6749;};var beaverLogger=require(_0x04f5('0x0'));var express=require(_0x04f5('0x1'));var auth=require(_0x04f5('0x2'));var config=require(_0x04f5('0x3'));var router=express[_0x04f5('0x4')]();var isProduction=config[_0x04f5('0x5')]===_0x04f5('0x6')||![];function clientSideLogs(_0x14e617,_0x1835aa,_0x5b0307){var _0x336708=_0x14e617['app'][_0x04f5('0x7')](_0x04f5('0x8'));if(!_0x336708){throw new Error(_0x04f5('0x9'));}return beaverLogger['expressEndpoint']({'uri':_0x04f5('0xa'),'logger':_0x336708,'enableCors':!isProduction})(_0x14e617,_0x1835aa,_0x5b0307);}router[_0x04f5('0xb')](auth[_0x04f5('0xc')](),clientSideLogs);module['exports']=router;