a8ea2b7cbd9b0ff343381869f215ff56cff282ac
[motion2.git] / server / api / setting / index.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 _0x17ab=['/:id','/:id/logo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getPreferred','/:id/favicon','getFavicon','diskStorage','root','server/files/images/logos/','format','%s%s','logo','extname','originalname','post','file','addLogo','join','logologin','single','addLogoLogin','preferred','addPreferred','favicon','addFavicon','put','update','exports','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./setting.controller','get','isAuthenticated','index','/now','getDate'];(function(_0x513aa5,_0x1fba79){var _0x1a1a7c=function(_0x240e3f){while(--_0x240e3f){_0x513aa5['push'](_0x513aa5['shift']());}};_0x1a1a7c(++_0x1fba79);}(_0x17ab,0x154));var _0xb17a=function(_0x1105bc,_0x45f698){_0x1105bc=_0x1105bc-0x0;var _0x46a675=_0x17ab[_0x1105bc];return _0x46a675;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xb17a('0x0'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xb17a('0x1')]();var fs_extra=require(_0xb17a('0x2'));var auth=require(_0xb17a('0x3'));var interaction=require(_0xb17a('0x4'));var config=require(_0xb17a('0x5'));var controller=require(_0xb17a('0x6'));router[_0xb17a('0x7')]('/',auth[_0xb17a('0x8')](),controller[_0xb17a('0x9')]);router[_0xb17a('0x7')](_0xb17a('0xa'),controller[_0xb17a('0xb')]);router[_0xb17a('0x7')](_0xb17a('0xc'),controller['show']);router[_0xb17a('0x7')](_0xb17a('0xd'),controller['getLogo']);router[_0xb17a('0x7')](_0xb17a('0xe'),controller[_0xb17a('0xf')]);router[_0xb17a('0x7')](_0xb17a('0x10'),controller[_0xb17a('0x11')]);router[_0xb17a('0x7')](_0xb17a('0x12'),controller[_0xb17a('0x13')]);router[_0xb17a('0x7')](_0xb17a('0x14'),controller[_0xb17a('0x15')]);var upload=multer({'storage':multer[_0xb17a('0x16')]({'destination':function(_0x2dd517,_0x5142c5,_0x4704b5){_0x4704b5(null,path['join'](config[_0xb17a('0x17')],_0xb17a('0x18')));},'filename':function(_0xa9dcc2,_0xa4b09b,_0xbf5965){_0xbf5965(null,util[_0xb17a('0x19')](_0xb17a('0x1a'),_0xb17a('0x1b'),path[_0xb17a('0x1c')](_0xa4b09b[_0xb17a('0x1d')])));}})});router[_0xb17a('0x1e')](_0xb17a('0xd'),upload['single'](_0xb17a('0x1f')),controller[_0xb17a('0x20')]);var upload=multer({'storage':multer[_0xb17a('0x16')]({'destination':function(_0xc6eae3,_0x5f0034,_0x1941c5){_0x1941c5(null,path[_0xb17a('0x21')](config['root'],_0xb17a('0x18')));},'filename':function(_0x5ecbbe,_0x4baf69,_0xca6d18){_0xca6d18(null,util[_0xb17a('0x19')](_0xb17a('0x1a'),_0xb17a('0x22'),path['extname'](_0x4baf69[_0xb17a('0x1d')])));}})});router[_0xb17a('0x1e')](_0xb17a('0xe'),upload[_0xb17a('0x23')](_0xb17a('0x1f')),controller[_0xb17a('0x24')]);var upload=multer({'storage':multer[_0xb17a('0x16')]({'destination':function(_0x17f4ff,_0x3b9ca6,_0x4f1f5c){_0x4f1f5c(null,path[_0xb17a('0x21')](config[_0xb17a('0x17')],_0xb17a('0x18')));},'filename':function(_0x4f2737,_0x3972a8,_0x148579){_0x148579(null,util['format'](_0xb17a('0x1a'),_0xb17a('0x25'),path[_0xb17a('0x1c')](_0x3972a8[_0xb17a('0x1d')])));}})});router['post'](_0xb17a('0x12'),upload[_0xb17a('0x23')]('file'),controller[_0xb17a('0x26')]);var upload=multer({'storage':multer[_0xb17a('0x16')]({'destination':function(_0x10071d,_0x3340ae,_0x5c6572){_0x5c6572(null,path[_0xb17a('0x21')](config[_0xb17a('0x17')],'server/files/images/logos/'));},'filename':function(_0xf31b73,_0x23de4a,_0x49377a){_0x49377a(null,util[_0xb17a('0x19')](_0xb17a('0x1a'),_0xb17a('0x27'),path[_0xb17a('0x1c')](_0x23de4a['originalname'])));}})});router[_0xb17a('0x1e')](_0xb17a('0x14'),upload[_0xb17a('0x23')]('file'),controller[_0xb17a('0x28')]);router[_0xb17a('0x29')](_0xb17a('0xc'),auth[_0xb17a('0x8')](),controller[_0xb17a('0x2a')]);module[_0xb17a('0x2b')]=router;