Built motion from commit (unavailable).|2.4.17
[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 _0xe07a=['path','connect-timeout','express','Router','../../config/environment','./setting.controller','get','isAuthenticated','index','/:id','show','/:id/logo','getLogo','/:id/logo_login','getLogoLogin','gdpr','getPreferred','/:id/favicon','server/files/images/logos/','format','logo','originalname','post','single','file','addLogo','diskStorage','root','%s%s','extname','addLogoLogin','join','preferred','/:id/preferred','addPreferred','favicon','addFavicon','put','update','exports','multer','util'];(function(_0x3e278b,_0x29052c){var _0x290160=function(_0x46c7c5){while(--_0x46c7c5){_0x3e278b['push'](_0x3e278b['shift']());}};_0x290160(++_0x29052c);}(_0xe07a,0x1a2));var _0xae07=function(_0x3e4a1f,_0xc57a6d){_0x3e4a1f=_0x3e4a1f-0x0;var _0x440e16=_0xe07a[_0x3e4a1f];return _0x440e16;};'use strict';var multer=require(_0xae07('0x0'));var util=require(_0xae07('0x1'));var path=require(_0xae07('0x2'));var timeout=require(_0xae07('0x3'));var express=require(_0xae07('0x4'));var router=express[_0xae07('0x5')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xae07('0x6'));var controller=require(_0xae07('0x7'));router[_0xae07('0x8')]('/',auth[_0xae07('0x9')](),controller[_0xae07('0xa')]);router[_0xae07('0x8')](_0xae07('0xb'),controller[_0xae07('0xc')]);router['get'](_0xae07('0xd'),controller[_0xae07('0xe')]);router[_0xae07('0x8')](_0xae07('0xf'),controller[_0xae07('0x10')]);router[_0xae07('0x8')]('/:id/gdpr',controller[_0xae07('0x11')]);router['get']('/:id/preferred',controller[_0xae07('0x12')]);router[_0xae07('0x8')](_0xae07('0x13'),controller['getFavicon']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x300125,_0xfcb08d,_0x1e577a){_0x1e577a(null,path['join'](config['root'],_0xae07('0x14')));},'filename':function(_0x472024,_0x266a64,_0x4fd71a){_0x4fd71a(null,util[_0xae07('0x15')]('%s%s',_0xae07('0x16'),path['extname'](_0x266a64[_0xae07('0x17')])));}})});router[_0xae07('0x18')](_0xae07('0xd'),upload[_0xae07('0x19')](_0xae07('0x1a')),controller[_0xae07('0x1b')]);var upload=multer({'storage':multer[_0xae07('0x1c')]({'destination':function(_0x3ee177,_0x1a2946,_0x4b74e7){_0x4b74e7(null,path['join'](config[_0xae07('0x1d')],'server/files/images/logos/'));},'filename':function(_0x5db555,_0x58162c,_0xef680e){_0xef680e(null,util[_0xae07('0x15')](_0xae07('0x1e'),'logologin',path[_0xae07('0x1f')](_0x58162c[_0xae07('0x17')])));}})});router[_0xae07('0x18')](_0xae07('0xf'),upload[_0xae07('0x19')](_0xae07('0x1a')),controller[_0xae07('0x20')]);var upload=multer({'storage':multer[_0xae07('0x1c')]({'destination':function(_0x29c9c9,_0x24d42a,_0x282820){_0x282820(null,path[_0xae07('0x21')](config[_0xae07('0x1d')],_0xae07('0x14')));},'filename':function(_0x329317,_0x20940a,_0x528289){_0x528289(null,util[_0xae07('0x15')](_0xae07('0x1e'),_0xae07('0x22'),path[_0xae07('0x1f')](_0x20940a[_0xae07('0x17')])));}})});router[_0xae07('0x18')](_0xae07('0x23'),upload[_0xae07('0x19')]('file'),controller[_0xae07('0x24')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5adb4a,_0x26a91a,_0x1327cc){_0x1327cc(null,path[_0xae07('0x21')](config['root'],_0xae07('0x14')));},'filename':function(_0x393c02,_0x29ed4,_0x9f7c90){_0x9f7c90(null,util[_0xae07('0x15')](_0xae07('0x1e'),_0xae07('0x25'),path[_0xae07('0x1f')](_0x29ed4[_0xae07('0x17')])));}})});router['post'](_0xae07('0x13'),upload[_0xae07('0x19')](_0xae07('0x1a')),controller[_0xae07('0x26')]);router[_0xae07('0x27')](_0xae07('0xb'),auth['isAuthenticated'](),controller[_0xae07('0x28')]);module[_0xae07('0x29')]=router;