Built motion from commit f7863d46.|2.5.41
[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 _0x3a3d=['put','/:id','update','exports','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./setting.controller','get','isAuthenticated','index','/now','getDate','show','getLogo','/:id/logo_login','/:id/gdpr','gdpr','getPreferred','/:id/favicon','getFavicon','server/files/images/logos/','%s%s','logo','extname','originalname','post','/:id/logo','file','addLogo','root','logologin','addLogoLogin','diskStorage','join','format','preferred','single','favicon','addFavicon'];(function(_0x18afca,_0x4219d9){var _0x11603f=function(_0x21d5d1){while(--_0x21d5d1){_0x18afca['push'](_0x18afca['shift']());}};_0x11603f(++_0x4219d9);}(_0x3a3d,0x187));var _0xd3a3=function(_0x43ed61,_0x3165e7){_0x43ed61=_0x43ed61-0x0;var _0x4ddb8f=_0x3a3d[_0x43ed61];return _0x4ddb8f;};'use strict';var multer=require('multer');var util=require(_0xd3a3('0x0'));var path=require(_0xd3a3('0x1'));var timeout=require(_0xd3a3('0x2'));var express=require('express');var router=express[_0xd3a3('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xd3a3('0x4'));var interaction=require(_0xd3a3('0x5'));var config=require('../../config/environment');var controller=require(_0xd3a3('0x6'));router[_0xd3a3('0x7')]('/',auth[_0xd3a3('0x8')](),controller[_0xd3a3('0x9')]);router[_0xd3a3('0x7')](_0xd3a3('0xa'),controller[_0xd3a3('0xb')]);router[_0xd3a3('0x7')]('/:id',controller[_0xd3a3('0xc')]);router[_0xd3a3('0x7')]('/:id/logo',controller[_0xd3a3('0xd')]);router[_0xd3a3('0x7')](_0xd3a3('0xe'),controller['getLogoLogin']);router[_0xd3a3('0x7')](_0xd3a3('0xf'),controller[_0xd3a3('0x10')]);router[_0xd3a3('0x7')]('/:id/preferred',controller[_0xd3a3('0x11')]);router['get'](_0xd3a3('0x12'),controller[_0xd3a3('0x13')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3b9db8,_0x7d021e,_0x46c79b){_0x46c79b(null,path['join'](config['root'],_0xd3a3('0x14')));},'filename':function(_0x531be4,_0x127dbf,_0x351596){_0x351596(null,util['format'](_0xd3a3('0x15'),_0xd3a3('0x16'),path[_0xd3a3('0x17')](_0x127dbf[_0xd3a3('0x18')])));}})});router[_0xd3a3('0x19')](_0xd3a3('0x1a'),upload['single'](_0xd3a3('0x1b')),controller[_0xd3a3('0x1c')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5c71fc,_0x1dfe53,_0x902812){_0x902812(null,path['join'](config[_0xd3a3('0x1d')],_0xd3a3('0x14')));},'filename':function(_0x576e18,_0x55324a,_0x34dc7c){_0x34dc7c(null,util['format'](_0xd3a3('0x15'),_0xd3a3('0x1e'),path[_0xd3a3('0x17')](_0x55324a['originalname'])));}})});router[_0xd3a3('0x19')](_0xd3a3('0xe'),upload['single'](_0xd3a3('0x1b')),controller[_0xd3a3('0x1f')]);var upload=multer({'storage':multer[_0xd3a3('0x20')]({'destination':function(_0x3bb198,_0x44704a,_0x1b78ff){_0x1b78ff(null,path[_0xd3a3('0x21')](config[_0xd3a3('0x1d')],_0xd3a3('0x14')));},'filename':function(_0xc37471,_0x27284b,_0x34b541){_0x34b541(null,util[_0xd3a3('0x22')]('%s%s',_0xd3a3('0x23'),path[_0xd3a3('0x17')](_0x27284b[_0xd3a3('0x18')])));}})});router[_0xd3a3('0x19')]('/:id/preferred',upload[_0xd3a3('0x24')](_0xd3a3('0x1b')),controller['addPreferred']);var upload=multer({'storage':multer[_0xd3a3('0x20')]({'destination':function(_0x4874a3,_0x48e171,_0x2b04cb){_0x2b04cb(null,path[_0xd3a3('0x21')](config[_0xd3a3('0x1d')],_0xd3a3('0x14')));},'filename':function(_0x49b7a1,_0x4eefde,_0x3587b4){_0x3587b4(null,util['format'](_0xd3a3('0x15'),_0xd3a3('0x25'),path[_0xd3a3('0x17')](_0x4eefde[_0xd3a3('0x18')])));}})});router[_0xd3a3('0x19')](_0xd3a3('0x12'),upload['single'](_0xd3a3('0x1b')),controller[_0xd3a3('0x26')]);router[_0xd3a3('0x27')](_0xd3a3('0x28'),auth[_0xd3a3('0x8')](),controller[_0xd3a3('0x29')]);module[_0xd3a3('0x2a')]=router;