Built motion from commit (unavailable).|2.5.12
[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 _0x0ce0=['logologin','single','addLogoLogin','preferred','addPreferred','favicon','addFavicon','put','/:id','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./setting.controller','isAuthenticated','index','get','/now','getDate','show','/:id/logo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getPreferred','/:id/favicon','getFavicon','diskStorage','join','root','server/files/images/logos/','format','%s%s','logo','extname','originalname','post','file','addLogo'];(function(_0x56e2f4,_0x1b6fd1){var _0x12d567=function(_0x1195c4){while(--_0x1195c4){_0x56e2f4['push'](_0x56e2f4['shift']());}};_0x12d567(++_0x1b6fd1);}(_0x0ce0,0x136));var _0x00ce=function(_0x58b3ca,_0x4183bc){_0x58b3ca=_0x58b3ca-0x0;var _0x1dfab9=_0x0ce0[_0x58b3ca];return _0x1dfab9;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x00ce('0x0'));var timeout=require(_0x00ce('0x1'));var express=require(_0x00ce('0x2'));var router=express[_0x00ce('0x3')]();var auth=require(_0x00ce('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x00ce('0x5'));var controller=require(_0x00ce('0x6'));router['get']('/',auth[_0x00ce('0x7')](),controller[_0x00ce('0x8')]);router[_0x00ce('0x9')](_0x00ce('0xa'),controller[_0x00ce('0xb')]);router[_0x00ce('0x9')]('/:id',controller[_0x00ce('0xc')]);router[_0x00ce('0x9')](_0x00ce('0xd'),controller['getLogo']);router[_0x00ce('0x9')](_0x00ce('0xe'),controller[_0x00ce('0xf')]);router[_0x00ce('0x9')](_0x00ce('0x10'),controller[_0x00ce('0x11')]);router['get'](_0x00ce('0x12'),controller[_0x00ce('0x13')]);router[_0x00ce('0x9')](_0x00ce('0x14'),controller[_0x00ce('0x15')]);var upload=multer({'storage':multer[_0x00ce('0x16')]({'destination':function(_0x2d11f6,_0x217bc7,_0x258832){_0x258832(null,path[_0x00ce('0x17')](config[_0x00ce('0x18')],_0x00ce('0x19')));},'filename':function(_0x1dc185,_0x91f69a,_0x5171f4){_0x5171f4(null,util[_0x00ce('0x1a')](_0x00ce('0x1b'),_0x00ce('0x1c'),path[_0x00ce('0x1d')](_0x91f69a[_0x00ce('0x1e')])));}})});router[_0x00ce('0x1f')]('/:id/logo',upload['single'](_0x00ce('0x20')),controller[_0x00ce('0x21')]);var upload=multer({'storage':multer[_0x00ce('0x16')]({'destination':function(_0x34fa55,_0x5273aa,_0x729c7d){_0x729c7d(null,path['join'](config['root'],_0x00ce('0x19')));},'filename':function(_0x389408,_0x44f914,_0x1a5dd0){_0x1a5dd0(null,util[_0x00ce('0x1a')](_0x00ce('0x1b'),_0x00ce('0x22'),path[_0x00ce('0x1d')](_0x44f914[_0x00ce('0x1e')])));}})});router[_0x00ce('0x1f')](_0x00ce('0xe'),upload[_0x00ce('0x23')](_0x00ce('0x20')),controller[_0x00ce('0x24')]);var upload=multer({'storage':multer[_0x00ce('0x16')]({'destination':function(_0xb54d9c,_0x256bff,_0x21f501){_0x21f501(null,path[_0x00ce('0x17')](config[_0x00ce('0x18')],_0x00ce('0x19')));},'filename':function(_0x49b366,_0xf5881c,_0x318a83){_0x318a83(null,util['format']('%s%s',_0x00ce('0x25'),path[_0x00ce('0x1d')](_0xf5881c[_0x00ce('0x1e')])));}})});router[_0x00ce('0x1f')](_0x00ce('0x12'),upload[_0x00ce('0x23')](_0x00ce('0x20')),controller[_0x00ce('0x26')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x7dae8e,_0x3c17ae,_0x42ecd4){_0x42ecd4(null,path[_0x00ce('0x17')](config[_0x00ce('0x18')],_0x00ce('0x19')));},'filename':function(_0x67d329,_0x545be8,_0x4adc6b){_0x4adc6b(null,util['format'](_0x00ce('0x1b'),_0x00ce('0x27'),path[_0x00ce('0x1d')](_0x545be8[_0x00ce('0x1e')])));}})});router[_0x00ce('0x1f')]('/:id/favicon',upload['single']('file'),controller[_0x00ce('0x28')]);router[_0x00ce('0x29')](_0x00ce('0x2a'),auth[_0x00ce('0x7')](),controller['update']);module['exports']=router;