Built motion from commit (unavailable).|2.5.4
[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 _0xae0f=['update','multer','util','connect-timeout','express','../../components/auth/service','../../config/environment','./setting.controller','get','index','/:id','show','/:id/logo','getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getPreferred','getFavicon','diskStorage','join','root','server/files/images/logos/','format','%s%s','logo','extname','originalname','post','single','addLogo','logologin','addLogoLogin','preferred','addPreferred','/:id/favicon','file','isAuthenticated'];(function(_0x197919,_0x24153d){var _0x5e5155=function(_0x444169){while(--_0x444169){_0x197919['push'](_0x197919['shift']());}};_0x5e5155(++_0x24153d);}(_0xae0f,0x1e1));var _0xfae0=function(_0xa3ddd7,_0x4d2263){_0xa3ddd7=_0xa3ddd7-0x0;var _0x45e6cd=_0xae0f[_0xa3ddd7];return _0x45e6cd;};'use strict';var multer=require(_0xfae0('0x0'));var util=require(_0xfae0('0x1'));var path=require('path');var timeout=require(_0xfae0('0x2'));var express=require(_0xfae0('0x3'));var router=express['Router']();var auth=require(_0xfae0('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xfae0('0x5'));var controller=require(_0xfae0('0x6'));router[_0xfae0('0x7')]('/',auth['isAuthenticated'](),controller[_0xfae0('0x8')]);router['get'](_0xfae0('0x9'),controller[_0xfae0('0xa')]);router[_0xfae0('0x7')](_0xfae0('0xb'),controller[_0xfae0('0xc')]);router[_0xfae0('0x7')](_0xfae0('0xd'),controller[_0xfae0('0xe')]);router[_0xfae0('0x7')](_0xfae0('0xf'),controller[_0xfae0('0x10')]);router[_0xfae0('0x7')](_0xfae0('0x11'),controller[_0xfae0('0x12')]);router[_0xfae0('0x7')]('/:id/favicon',controller[_0xfae0('0x13')]);var upload=multer({'storage':multer[_0xfae0('0x14')]({'destination':function(_0x305a50,_0x1a178f,_0x4aa75e){_0x4aa75e(null,path[_0xfae0('0x15')](config[_0xfae0('0x16')],_0xfae0('0x17')));},'filename':function(_0x35ff9b,_0x52ed41,_0x343b56){_0x343b56(null,util[_0xfae0('0x18')](_0xfae0('0x19'),_0xfae0('0x1a'),path[_0xfae0('0x1b')](_0x52ed41[_0xfae0('0x1c')])));}})});router[_0xfae0('0x1d')](_0xfae0('0xb'),upload[_0xfae0('0x1e')]('file'),controller[_0xfae0('0x1f')]);var upload=multer({'storage':multer[_0xfae0('0x14')]({'destination':function(_0x36b466,_0x4dce1f,_0x1a4d89){_0x1a4d89(null,path[_0xfae0('0x15')](config['root'],'server/files/images/logos/'));},'filename':function(_0x4ce9ef,_0x253691,_0x19aaab){_0x19aaab(null,util[_0xfae0('0x18')]('%s%s',_0xfae0('0x20'),path[_0xfae0('0x1b')](_0x253691['originalname'])));}})});router[_0xfae0('0x1d')](_0xfae0('0xd'),upload[_0xfae0('0x1e')]('file'),controller[_0xfae0('0x21')]);var upload=multer({'storage':multer[_0xfae0('0x14')]({'destination':function(_0x2151ee,_0x47b018,_0x2b1245){_0x2b1245(null,path[_0xfae0('0x15')](config[_0xfae0('0x16')],_0xfae0('0x17')));},'filename':function(_0x590a03,_0x798d3b,_0x3e7c4b){_0x3e7c4b(null,util[_0xfae0('0x18')](_0xfae0('0x19'),_0xfae0('0x22'),path[_0xfae0('0x1b')](_0x798d3b[_0xfae0('0x1c')])));}})});router['post']('/:id/preferred',upload[_0xfae0('0x1e')]('file'),controller[_0xfae0('0x23')]);var upload=multer({'storage':multer[_0xfae0('0x14')]({'destination':function(_0x57785c,_0xd0c560,_0x1c7dd5){_0x1c7dd5(null,path[_0xfae0('0x15')](config[_0xfae0('0x16')],_0xfae0('0x17')));},'filename':function(_0x13412c,_0x58b84f,_0x3904db){_0x3904db(null,util[_0xfae0('0x18')]('%s%s','favicon',path['extname'](_0x58b84f['originalname'])));}})});router['post'](_0xfae0('0x24'),upload[_0xfae0('0x1e')](_0xfae0('0x25')),controller['addFavicon']);router['put'](_0xfae0('0x9'),auth[_0xfae0('0x26')](),controller[_0xfae0('0x27')]);module['exports']=router;