ffc8fcf6c4f6f8e4177133663beda594236740c6
[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 _0xf986=['/:id/favicon','addFavicon','isAuthenticated','update','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./setting.controller','get','index','/now','/:id','show','/:id/logo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getPreferred','diskStorage','join','root','server/files/images/logos/','%s%s','logo','extname','post','single','file','addLogo','format','logologin','originalname','addLogoLogin','preferred','addPreferred','favicon'];(function(_0x45c751,_0x522b16){var _0x36e47e=function(_0x40831d){while(--_0x40831d){_0x45c751['push'](_0x45c751['shift']());}};_0x36e47e(++_0x522b16);}(_0xf986,0xb1));var _0x6f98=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xf986[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require(_0x6f98('0x0'));var util=require('util');var path=require(_0x6f98('0x1'));var timeout=require(_0x6f98('0x2'));var express=require('express');var router=express[_0x6f98('0x3')]();var fs_extra=require(_0x6f98('0x4'));var auth=require(_0x6f98('0x5'));var interaction=require(_0x6f98('0x6'));var config=require('../../config/environment');var controller=require(_0x6f98('0x7'));router[_0x6f98('0x8')]('/',auth['isAuthenticated'](),controller[_0x6f98('0x9')]);router[_0x6f98('0x8')](_0x6f98('0xa'),controller['getDate']);router[_0x6f98('0x8')](_0x6f98('0xb'),controller[_0x6f98('0xc')]);router[_0x6f98('0x8')](_0x6f98('0xd'),controller['getLogo']);router[_0x6f98('0x8')](_0x6f98('0xe'),controller[_0x6f98('0xf')]);router[_0x6f98('0x8')](_0x6f98('0x10'),controller[_0x6f98('0x11')]);router[_0x6f98('0x8')](_0x6f98('0x12'),controller[_0x6f98('0x13')]);router['get']('/:id/favicon',controller['getFavicon']);var upload=multer({'storage':multer[_0x6f98('0x14')]({'destination':function(_0x41a405,_0x221cb2,_0x19ede4){_0x19ede4(null,path[_0x6f98('0x15')](config[_0x6f98('0x16')],_0x6f98('0x17')));},'filename':function(_0x12bc27,_0x5574df,_0x84847f){_0x84847f(null,util['format'](_0x6f98('0x18'),_0x6f98('0x19'),path[_0x6f98('0x1a')](_0x5574df['originalname'])));}})});router[_0x6f98('0x1b')](_0x6f98('0xd'),upload[_0x6f98('0x1c')](_0x6f98('0x1d')),controller[_0x6f98('0x1e')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1315e5,_0x57ba42,_0x54ebcd){_0x54ebcd(null,path[_0x6f98('0x15')](config[_0x6f98('0x16')],_0x6f98('0x17')));},'filename':function(_0x46da41,_0x3abef3,_0x14705a){_0x14705a(null,util[_0x6f98('0x1f')](_0x6f98('0x18'),_0x6f98('0x20'),path[_0x6f98('0x1a')](_0x3abef3[_0x6f98('0x21')])));}})});router[_0x6f98('0x1b')]('/:id/logo_login',upload[_0x6f98('0x1c')](_0x6f98('0x1d')),controller[_0x6f98('0x22')]);var upload=multer({'storage':multer[_0x6f98('0x14')]({'destination':function(_0xf61b09,_0x5e4fb3,_0x5dccd8){_0x5dccd8(null,path[_0x6f98('0x15')](config[_0x6f98('0x16')],_0x6f98('0x17')));},'filename':function(_0x7a7cb9,_0x5d39fe,_0x5d0eda){_0x5d0eda(null,util[_0x6f98('0x1f')](_0x6f98('0x18'),_0x6f98('0x23'),path[_0x6f98('0x1a')](_0x5d39fe[_0x6f98('0x21')])));}})});router[_0x6f98('0x1b')](_0x6f98('0x12'),upload[_0x6f98('0x1c')]('file'),controller[_0x6f98('0x24')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x4932a6,_0x3cbbb1,_0x715729){_0x715729(null,path[_0x6f98('0x15')](config['root'],_0x6f98('0x17')));},'filename':function(_0x1a536a,_0x2df6d8,_0x2bbee1){_0x2bbee1(null,util[_0x6f98('0x1f')](_0x6f98('0x18'),_0x6f98('0x25'),path[_0x6f98('0x1a')](_0x2df6d8[_0x6f98('0x21')])));}})});router[_0x6f98('0x1b')](_0x6f98('0x26'),upload[_0x6f98('0x1c')]('file'),controller[_0x6f98('0x27')]);router['put'](_0x6f98('0xb'),auth[_0x6f98('0x28')](),controller[_0x6f98('0x29')]);module[_0x6f98('0x2a')]=router;