Built motion from commit 14588770.|2.5.38
[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 _0x8bcf=['../../components/interaction/service','./setting.controller','get','isAuthenticated','/now','getDate','/:id/logo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getPreferred','/:id/favicon','getFavicon','diskStorage','join','root','format','%s%s','logo','extname','originalname','post','single','addLogo','logologin','file','addLogoLogin','server/files/images/logos/','addPreferred','addFavicon','put','/:id','update','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x53fedb,_0x5b98ed){var _0x5d08fc=function(_0x1b3cea){while(--_0x1b3cea){_0x53fedb['push'](_0x53fedb['shift']());}};_0x5d08fc(++_0x5b98ed);}(_0x8bcf,0xa5));var _0xf8bc=function(_0x38eea7,_0x112bf4){_0x38eea7=_0x38eea7-0x0;var _0x31265d=_0x8bcf[_0x38eea7];return _0x31265d;};'use strict';var multer=require(_0xf8bc('0x0'));var util=require('util');var path=require(_0xf8bc('0x1'));var timeout=require(_0xf8bc('0x2'));var express=require(_0xf8bc('0x3'));var router=express[_0xf8bc('0x4')]();var fs_extra=require(_0xf8bc('0x5'));var auth=require(_0xf8bc('0x6'));var interaction=require(_0xf8bc('0x7'));var config=require('../../config/environment');var controller=require(_0xf8bc('0x8'));router[_0xf8bc('0x9')]('/',auth[_0xf8bc('0xa')](),controller['index']);router[_0xf8bc('0x9')](_0xf8bc('0xb'),controller[_0xf8bc('0xc')]);router[_0xf8bc('0x9')]('/:id',controller['show']);router[_0xf8bc('0x9')](_0xf8bc('0xd'),controller['getLogo']);router['get'](_0xf8bc('0xe'),controller[_0xf8bc('0xf')]);router['get'](_0xf8bc('0x10'),controller[_0xf8bc('0x11')]);router['get'](_0xf8bc('0x12'),controller[_0xf8bc('0x13')]);router[_0xf8bc('0x9')](_0xf8bc('0x14'),controller[_0xf8bc('0x15')]);var upload=multer({'storage':multer[_0xf8bc('0x16')]({'destination':function(_0x168a1f,_0x4edbda,_0x151d66){_0x151d66(null,path[_0xf8bc('0x17')](config[_0xf8bc('0x18')],'server/files/images/logos/'));},'filename':function(_0x370323,_0x5ef2ae,_0x358d45){_0x358d45(null,util[_0xf8bc('0x19')](_0xf8bc('0x1a'),_0xf8bc('0x1b'),path[_0xf8bc('0x1c')](_0x5ef2ae[_0xf8bc('0x1d')])));}})});router[_0xf8bc('0x1e')]('/:id/logo',upload[_0xf8bc('0x1f')]('file'),controller[_0xf8bc('0x20')]);var upload=multer({'storage':multer[_0xf8bc('0x16')]({'destination':function(_0x447836,_0x445b28,_0x3d3749){_0x3d3749(null,path['join'](config['root'],'server/files/images/logos/'));},'filename':function(_0x172cba,_0x1b339a,_0x27f9eb){_0x27f9eb(null,util[_0xf8bc('0x19')](_0xf8bc('0x1a'),_0xf8bc('0x21'),path['extname'](_0x1b339a['originalname'])));}})});router[_0xf8bc('0x1e')]('/:id/logo_login',upload[_0xf8bc('0x1f')](_0xf8bc('0x22')),controller[_0xf8bc('0x23')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3214a3,_0x2b2ffe,_0x4dfaad){_0x4dfaad(null,path[_0xf8bc('0x17')](config[_0xf8bc('0x18')],_0xf8bc('0x24')));},'filename':function(_0x47ab74,_0x3fb697,_0x5aeff3){_0x5aeff3(null,util[_0xf8bc('0x19')](_0xf8bc('0x1a'),'preferred',path[_0xf8bc('0x1c')](_0x3fb697[_0xf8bc('0x1d')])));}})});router['post'](_0xf8bc('0x12'),upload[_0xf8bc('0x1f')](_0xf8bc('0x22')),controller[_0xf8bc('0x25')]);var upload=multer({'storage':multer[_0xf8bc('0x16')]({'destination':function(_0x56ecee,_0xdc64ee,_0x4cec5e){_0x4cec5e(null,path[_0xf8bc('0x17')](config[_0xf8bc('0x18')],_0xf8bc('0x24')));},'filename':function(_0xd5a643,_0x2697a9,_0x3d88a2){_0x3d88a2(null,util[_0xf8bc('0x19')](_0xf8bc('0x1a'),'favicon',path[_0xf8bc('0x1c')](_0x2697a9[_0xf8bc('0x1d')])));}})});router[_0xf8bc('0x1e')](_0xf8bc('0x14'),upload[_0xf8bc('0x1f')](_0xf8bc('0x22')),controller[_0xf8bc('0x26')]);router[_0xf8bc('0x27')](_0xf8bc('0x28'),auth[_0xf8bc('0xa')](),controller[_0xf8bc('0x29')]);module[_0xf8bc('0x2a')]=router;