2b6b74f0cac9d5924e82f9ac75561d29250e45c8
[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 _0x99d1=['../components/auth/service','env','app','get','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint','use','isAuthenticated','exports','beaver-logger/server'];(function(_0x2a8894,_0x3e9d43){var _0x4c866a=function(_0x16c08b){while(--_0x16c08b){_0x2a8894['push'](_0x2a8894['shift']());}};_0x4c866a(++_0x3e9d43);}(_0x99d1,0x78));var _0x199d=function(_0x440d34,_0x5d7152){_0x440d34=_0x440d34-0x0;var _0x5f493e=_0x99d1[_0x440d34];return _0x5f493e;};var beaverLogger=require(_0x199d('0x0'));var express=require('express');var auth=require(_0x199d('0x1'));var config=require('../config/environment');var router=express['Router']();var isProduction=config[_0x199d('0x2')]==='production'||![];function clientSideLogs(_0x3ebd83,_0x3bd252,_0x4b1073){var _0x434e2f=_0x3ebd83[_0x199d('0x3')][_0x199d('0x4')](_0x199d('0x5'));if(!_0x434e2f){throw new Error(_0x199d('0x6'));}return beaverLogger[_0x199d('0x7')]({'uri':'/client-logs','logger':_0x434e2f,'enableCors':!isProduction})(_0x3ebd83,_0x3bd252,_0x4b1073);}router[_0x199d('0x8')](auth[_0x199d('0x9')](),clientSideLogs);module[_0x199d('0xa')]=router;