Built motion from commit (unavailable).|2.4.20
[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 _0x7d2a=['single','addFavicon','put','update','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','./setting.controller','isAuthenticated','index','get','/:id','show','/:id/logo','getLogo','getLogoLogin','/:id/gdpr','/:id/preferred','getPreferred','/:id/favicon','server/files/images/logos/','format','%s%s','logo','extname','originalname','post','diskStorage','join','root','logologin','/:id/logo_login'];(function(_0x2b9cf5,_0x2a7804){var _0xd0cf15=function(_0x92a896){while(--_0x92a896){_0x2b9cf5['push'](_0x2b9cf5['shift']());}};_0xd0cf15(++_0x2a7804);}(_0x7d2a,0xe3));var _0xa7d2=function(_0x58af9e,_0x4aac5b){_0x58af9e=_0x58af9e-0x0;var _0x1f7eb5=_0x7d2a[_0x58af9e];return _0x1f7eb5;};'use strict';var multer=require(_0xa7d2('0x0'));var util=require(_0xa7d2('0x1'));var path=require(_0xa7d2('0x2'));var timeout=require(_0xa7d2('0x3'));var express=require(_0xa7d2('0x4'));var router=express[_0xa7d2('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0xa7d2('0x6'));var config=require('../../config/environment');var controller=require(_0xa7d2('0x7'));router['get']('/',auth[_0xa7d2('0x8')](),controller[_0xa7d2('0x9')]);router[_0xa7d2('0xa')](_0xa7d2('0xb'),controller[_0xa7d2('0xc')]);router[_0xa7d2('0xa')](_0xa7d2('0xd'),controller[_0xa7d2('0xe')]);router[_0xa7d2('0xa')]('/:id/logo_login',controller[_0xa7d2('0xf')]);router[_0xa7d2('0xa')](_0xa7d2('0x10'),controller['gdpr']);router[_0xa7d2('0xa')](_0xa7d2('0x11'),controller[_0xa7d2('0x12')]);router[_0xa7d2('0xa')](_0xa7d2('0x13'),controller['getFavicon']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x32b8a0,_0x48390a,_0x532190){_0x532190(null,path['join'](config['root'],_0xa7d2('0x14')));},'filename':function(_0x2144e3,_0x2e7f51,_0x3f29b3){_0x3f29b3(null,util[_0xa7d2('0x15')](_0xa7d2('0x16'),_0xa7d2('0x17'),path[_0xa7d2('0x18')](_0x2e7f51[_0xa7d2('0x19')])));}})});router[_0xa7d2('0x1a')](_0xa7d2('0xd'),upload['single']('file'),controller['addLogo']);var upload=multer({'storage':multer[_0xa7d2('0x1b')]({'destination':function(_0x339033,_0x3ab0f9,_0x4415d4){_0x4415d4(null,path[_0xa7d2('0x1c')](config[_0xa7d2('0x1d')],_0xa7d2('0x14')));},'filename':function(_0x15d847,_0x220b1f,_0x1e0198){_0x1e0198(null,util[_0xa7d2('0x15')](_0xa7d2('0x16'),_0xa7d2('0x1e'),path[_0xa7d2('0x18')](_0x220b1f['originalname'])));}})});router[_0xa7d2('0x1a')](_0xa7d2('0x1f'),upload[_0xa7d2('0x20')]('file'),controller['addLogoLogin']);var upload=multer({'storage':multer[_0xa7d2('0x1b')]({'destination':function(_0x3005df,_0x1a0a49,_0x8e6ace){_0x8e6ace(null,path[_0xa7d2('0x1c')](config[_0xa7d2('0x1d')],_0xa7d2('0x14')));},'filename':function(_0x19b3ec,_0x557583,_0x4dcefe){_0x4dcefe(null,util[_0xa7d2('0x15')](_0xa7d2('0x16'),'preferred',path[_0xa7d2('0x18')](_0x557583[_0xa7d2('0x19')])));}})});router[_0xa7d2('0x1a')](_0xa7d2('0x11'),upload[_0xa7d2('0x20')]('file'),controller['addPreferred']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xa03455,_0x3aaa77,_0xa79654){_0xa79654(null,path[_0xa7d2('0x1c')](config[_0xa7d2('0x1d')],_0xa7d2('0x14')));},'filename':function(_0x23227a,_0x5b8154,_0x5529e6){_0x5529e6(null,util[_0xa7d2('0x15')]('%s%s','favicon',path[_0xa7d2('0x18')](_0x5b8154[_0xa7d2('0x19')])));}})});router[_0xa7d2('0x1a')](_0xa7d2('0x13'),upload[_0xa7d2('0x20')]('file'),controller[_0xa7d2('0x21')]);router[_0xa7d2('0x22')](_0xa7d2('0xb'),auth[_0xa7d2('0x8')](),controller[_0xa7d2('0x23')]);module[_0xa7d2('0x24')]=router;