7bfd549735ec5ca8ea3e3c4c1b74a8c41794bb0d
[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 _0xc0bf=['isAuthenticated','index','/now','getDate','/:id','show','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getPreferred','/:id/favicon','getFavicon','diskStorage','join','root','server/files/images/logos/','format','%s%s','logo','extname','originalname','post','/:id/logo','single','file','logologin','addPreferred','addFavicon','put','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./setting.controller','get'];(function(_0x30f3c3,_0x2db7b1){var _0x3327ab=function(_0x1bc7ad){while(--_0x1bc7ad){_0x30f3c3['push'](_0x30f3c3['shift']());}};_0x3327ab(++_0x2db7b1);}(_0xc0bf,0xc4));var _0xfc0b=function(_0x566587,_0x1be561){_0x566587=_0x566587-0x0;var _0x27d817=_0xc0bf[_0x566587];return _0x27d817;};'use strict';var multer=require('multer');var util=require(_0xfc0b('0x0'));var path=require(_0xfc0b('0x1'));var timeout=require(_0xfc0b('0x2'));var express=require('express');var router=express[_0xfc0b('0x3')]();var fs_extra=require(_0xfc0b('0x4'));var auth=require(_0xfc0b('0x5'));var interaction=require(_0xfc0b('0x6'));var config=require('../../config/environment');var controller=require(_0xfc0b('0x7'));router[_0xfc0b('0x8')]('/',auth[_0xfc0b('0x9')](),controller[_0xfc0b('0xa')]);router[_0xfc0b('0x8')](_0xfc0b('0xb'),controller[_0xfc0b('0xc')]);router[_0xfc0b('0x8')](_0xfc0b('0xd'),controller[_0xfc0b('0xe')]);router[_0xfc0b('0x8')]('/:id/logo',controller['getLogo']);router[_0xfc0b('0x8')](_0xfc0b('0xf'),controller[_0xfc0b('0x10')]);router[_0xfc0b('0x8')](_0xfc0b('0x11'),controller[_0xfc0b('0x12')]);router['get'](_0xfc0b('0x13'),controller[_0xfc0b('0x14')]);router[_0xfc0b('0x8')](_0xfc0b('0x15'),controller[_0xfc0b('0x16')]);var upload=multer({'storage':multer[_0xfc0b('0x17')]({'destination':function(_0x3f69a1,_0x792f46,_0x34ecab){_0x34ecab(null,path[_0xfc0b('0x18')](config[_0xfc0b('0x19')],_0xfc0b('0x1a')));},'filename':function(_0x2bb957,_0xd3d899,_0x5641a9){_0x5641a9(null,util[_0xfc0b('0x1b')](_0xfc0b('0x1c'),_0xfc0b('0x1d'),path[_0xfc0b('0x1e')](_0xd3d899[_0xfc0b('0x1f')])));}})});router[_0xfc0b('0x20')](_0xfc0b('0x21'),upload[_0xfc0b('0x22')](_0xfc0b('0x23')),controller['addLogo']);var upload=multer({'storage':multer[_0xfc0b('0x17')]({'destination':function(_0x23807f,_0x29a7b2,_0x5ed212){_0x5ed212(null,path[_0xfc0b('0x18')](config[_0xfc0b('0x19')],_0xfc0b('0x1a')));},'filename':function(_0x18ebf7,_0x32af29,_0x4e0415){_0x4e0415(null,util[_0xfc0b('0x1b')]('%s%s',_0xfc0b('0x24'),path['extname'](_0x32af29[_0xfc0b('0x1f')])));}})});router[_0xfc0b('0x20')](_0xfc0b('0xf'),upload['single'](_0xfc0b('0x23')),controller['addLogoLogin']);var upload=multer({'storage':multer[_0xfc0b('0x17')]({'destination':function(_0x1fdd96,_0x370650,_0x543947){_0x543947(null,path[_0xfc0b('0x18')](config[_0xfc0b('0x19')],_0xfc0b('0x1a')));},'filename':function(_0x4fe970,_0x1cc849,_0x8eed7a){_0x8eed7a(null,util['format']('%s%s','preferred',path[_0xfc0b('0x1e')](_0x1cc849[_0xfc0b('0x1f')])));}})});router[_0xfc0b('0x20')](_0xfc0b('0x13'),upload[_0xfc0b('0x22')](_0xfc0b('0x23')),controller[_0xfc0b('0x25')]);var upload=multer({'storage':multer[_0xfc0b('0x17')]({'destination':function(_0x487f96,_0x20abe0,_0x382401){_0x382401(null,path[_0xfc0b('0x18')](config[_0xfc0b('0x19')],'server/files/images/logos/'));},'filename':function(_0x54013f,_0x2f698c,_0xdde56b){_0xdde56b(null,util[_0xfc0b('0x1b')]('%s%s','favicon',path['extname'](_0x2f698c[_0xfc0b('0x1f')])));}})});router[_0xfc0b('0x20')](_0xfc0b('0x15'),upload[_0xfc0b('0x22')](_0xfc0b('0x23')),controller[_0xfc0b('0x26')]);router[_0xfc0b('0x27')]('/:id',auth[_0xfc0b('0x9')](),controller['update']);module[_0xfc0b('0x28')]=router;