Built motion from commit 85328c08.|2.5.50
[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 _0xa8be=['express','../components/auth/service','Router','env','get','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs','use','isAuthenticated','exports'];(function(_0x1a9f06,_0x33a13e){var _0x4a7115=function(_0x49a285){while(--_0x49a285){_0x1a9f06['push'](_0x1a9f06['shift']());}};_0x4a7115(++_0x33a13e);}(_0xa8be,0x114));var _0xea8b=function(_0x323f2c,_0x38c0dd){_0x323f2c=_0x323f2c-0x0;var _0x909352=_0xa8be[_0x323f2c];return _0x909352;};var beaverLogger=require('beaver-logger/server');var express=require(_0xea8b('0x0'));var auth=require(_0xea8b('0x1'));var config=require('../config/environment');var router=express[_0xea8b('0x2')]();var isProduction=config[_0xea8b('0x3')]==='production'||![];function clientSideLogs(_0x3174ec,_0x15289a,_0x4dfb79){var _0x86ec8b=_0x3174ec['app'][_0xea8b('0x4')](_0xea8b('0x5'));if(!_0x86ec8b){throw new Error(_0xea8b('0x6'));}return beaverLogger[_0xea8b('0x7')]({'uri':_0xea8b('0x8'),'logger':_0x86ec8b,'enableCors':!isProduction})(_0x3174ec,_0x15289a,_0x4dfb79);}router[_0xea8b('0x9')](auth[_0xea8b('0xa')](),clientSideLogs);module[_0xea8b('0xb')]=router;