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 _0x52e6=['Router','../../components/auth/service','./setting.controller','get','isAuthenticated','index','/:id','show','/:id/logo','getLogo','/:id/logo_login','getLogoLogin','gdpr','getPreferred','/:id/favicon','getFavicon','diskStorage','join','root','server/files/images/logos/','format','%s%s','logo','extname','single','addLogo','originalname','post','file','addLogoLogin','preferred','/:id/preferred','addPreferred','favicon','addFavicon','put','update','exports','multer','util','connect-timeout','express'];(function(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0x52e6,0x1ca));var _0x652e=function(_0x26eb67,_0x438d55){_0x26eb67=_0x26eb67-0x0;var _0x2de906=_0x52e6[_0x26eb67];return _0x2de906;};'use strict';var multer=require(_0x652e('0x0'));var util=require(_0x652e('0x1'));var path=require('path');var timeout=require(_0x652e('0x2'));var express=require(_0x652e('0x3'));var router=express[_0x652e('0x4')]();var auth=require(_0x652e('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x652e('0x6'));router[_0x652e('0x7')]('/',auth[_0x652e('0x8')](),controller[_0x652e('0x9')]);router[_0x652e('0x7')](_0x652e('0xa'),controller[_0x652e('0xb')]);router[_0x652e('0x7')](_0x652e('0xc'),controller[_0x652e('0xd')]);router['get'](_0x652e('0xe'),controller[_0x652e('0xf')]);router[_0x652e('0x7')]('/:id/gdpr',controller[_0x652e('0x10')]);router[_0x652e('0x7')]('/:id/preferred',controller[_0x652e('0x11')]);router[_0x652e('0x7')](_0x652e('0x12'),controller[_0x652e('0x13')]);var upload=multer({'storage':multer[_0x652e('0x14')]({'destination':function(_0x163791,_0x4fcd36,_0x25a990){_0x25a990(null,path[_0x652e('0x15')](config[_0x652e('0x16')],_0x652e('0x17')));},'filename':function(_0x2ea5d7,_0x3a1375,_0x42f675){_0x42f675(null,util[_0x652e('0x18')](_0x652e('0x19'),_0x652e('0x1a'),path[_0x652e('0x1b')](_0x3a1375['originalname'])));}})});router['post'](_0x652e('0xc'),upload[_0x652e('0x1c')]('file'),controller[_0x652e('0x1d')]);var upload=multer({'storage':multer[_0x652e('0x14')]({'destination':function(_0x4e2a8c,_0x14d67c,_0x5daf1a){_0x5daf1a(null,path['join'](config[_0x652e('0x16')],_0x652e('0x17')));},'filename':function(_0x2559e,_0x534d1e,_0x6aa81b){_0x6aa81b(null,util[_0x652e('0x18')](_0x652e('0x19'),'logologin',path[_0x652e('0x1b')](_0x534d1e[_0x652e('0x1e')])));}})});router[_0x652e('0x1f')](_0x652e('0xe'),upload[_0x652e('0x1c')](_0x652e('0x20')),controller[_0x652e('0x21')]);var upload=multer({'storage':multer[_0x652e('0x14')]({'destination':function(_0x33e151,_0x39632d,_0x49f2ec){_0x49f2ec(null,path['join'](config['root'],'server/files/images/logos/'));},'filename':function(_0x58ed5d,_0x5c8b4a,_0x3df432){_0x3df432(null,util[_0x652e('0x18')](_0x652e('0x19'),_0x652e('0x22'),path[_0x652e('0x1b')](_0x5c8b4a[_0x652e('0x1e')])));}})});router['post'](_0x652e('0x23'),upload[_0x652e('0x1c')](_0x652e('0x20')),controller[_0x652e('0x24')]);var upload=multer({'storage':multer[_0x652e('0x14')]({'destination':function(_0x529f36,_0x21a9ca,_0x48e17a){_0x48e17a(null,path[_0x652e('0x15')](config[_0x652e('0x16')],_0x652e('0x17')));},'filename':function(_0x4c7f74,_0x56ec75,_0x1644fd){_0x1644fd(null,util[_0x652e('0x18')](_0x652e('0x19'),_0x652e('0x25'),path[_0x652e('0x1b')](_0x56ec75[_0x652e('0x1e')])));}})});router[_0x652e('0x1f')](_0x652e('0x12'),upload['single'](_0x652e('0x20')),controller[_0x652e('0x26')]);router[_0x652e('0x27')](_0x652e('0xa'),auth[_0x652e('0x8')](),controller[_0x652e('0x28')]);module[_0x652e('0x29')]=router;