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 _0x279e=['get','isAuthenticated','index','/:id/logo','getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','getPreferred','/:id/favicon','getFavicon','diskStorage','join','root','server/files/images/logos/','logo','originalname','post','single','file','addLogo','%s%s','logologin','extname','addLogoLogin','preferred','/:id/preferred','format','favicon','put','update','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./setting.controller'];(function(_0x7d579a,_0x1580b){var _0x3b06cb=function(_0x4ba063){while(--_0x4ba063){_0x7d579a['push'](_0x7d579a['shift']());}};_0x3b06cb(++_0x1580b);}(_0x279e,0xc9));var _0xe279=function(_0x4190f4,_0x50804b){_0x4190f4=_0x4190f4-0x0;var _0x2f0f6d=_0x279e[_0x4190f4];return _0x2f0f6d;};'use strict';var multer=require(_0xe279('0x0'));var util=require(_0xe279('0x1'));var path=require(_0xe279('0x2'));var timeout=require(_0xe279('0x3'));var express=require(_0xe279('0x4'));var router=express['Router']();var auth=require(_0xe279('0x5'));var interaction=require(_0xe279('0x6'));var config=require(_0xe279('0x7'));var controller=require(_0xe279('0x8'));router[_0xe279('0x9')]('/',auth[_0xe279('0xa')](),controller[_0xe279('0xb')]);router[_0xe279('0x9')]('/:id',controller['show']);router[_0xe279('0x9')](_0xe279('0xc'),controller[_0xe279('0xd')]);router[_0xe279('0x9')](_0xe279('0xe'),controller[_0xe279('0xf')]);router['get'](_0xe279('0x10'),controller[_0xe279('0x11')]);router[_0xe279('0x9')]('/:id/preferred',controller[_0xe279('0x12')]);router[_0xe279('0x9')](_0xe279('0x13'),controller[_0xe279('0x14')]);var upload=multer({'storage':multer[_0xe279('0x15')]({'destination':function(_0x29b1a7,_0x25d9a1,_0x236168){_0x236168(null,path[_0xe279('0x16')](config[_0xe279('0x17')],_0xe279('0x18')));},'filename':function(_0x41c66d,_0x279d1e,_0x59fa38){_0x59fa38(null,util['format']('%s%s',_0xe279('0x19'),path['extname'](_0x279d1e[_0xe279('0x1a')])));}})});router[_0xe279('0x1b')]('/:id/logo',upload[_0xe279('0x1c')](_0xe279('0x1d')),controller[_0xe279('0x1e')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x28202d,_0x4f3237,_0x58ec01){_0x58ec01(null,path['join'](config[_0xe279('0x17')],'server/files/images/logos/'));},'filename':function(_0x22c1bf,_0x42ccf2,_0x198971){_0x198971(null,util['format'](_0xe279('0x1f'),_0xe279('0x20'),path[_0xe279('0x21')](_0x42ccf2[_0xe279('0x1a')])));}})});router[_0xe279('0x1b')](_0xe279('0xe'),upload[_0xe279('0x1c')](_0xe279('0x1d')),controller[_0xe279('0x22')]);var upload=multer({'storage':multer[_0xe279('0x15')]({'destination':function(_0x37dead,_0x15ec63,_0x1fc75f){_0x1fc75f(null,path[_0xe279('0x16')](config['root'],_0xe279('0x18')));},'filename':function(_0x258d51,_0x540dd6,_0x547b85){_0x547b85(null,util['format'](_0xe279('0x1f'),_0xe279('0x23'),path[_0xe279('0x21')](_0x540dd6[_0xe279('0x1a')])));}})});router[_0xe279('0x1b')](_0xe279('0x24'),upload[_0xe279('0x1c')](_0xe279('0x1d')),controller['addPreferred']);var upload=multer({'storage':multer[_0xe279('0x15')]({'destination':function(_0x56c8df,_0x34e833,_0x4aaef4){_0x4aaef4(null,path[_0xe279('0x16')](config[_0xe279('0x17')],'server/files/images/logos/'));},'filename':function(_0x48788e,_0x4d9015,_0x135e27){_0x135e27(null,util[_0xe279('0x25')](_0xe279('0x1f'),_0xe279('0x26'),path['extname'](_0x4d9015[_0xe279('0x1a')])));}})});router[_0xe279('0x1b')](_0xe279('0x13'),upload[_0xe279('0x1c')]('file'),controller['addFavicon']);router[_0xe279('0x27')]('/:id',auth[_0xe279('0xa')](),controller[_0xe279('0x28')]);module[_0xe279('0x29')]=router;