Built motion from commit (unavailable).|2.5.1
[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 _0xae56=['format','logo','/:id/logo','single','addLogo','root','%s%s','logologin','extname','originalname','post','addLogoLogin','join','preferred','file','addPreferred','favicon','addFavicon','put','update','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./setting.controller','get','isAuthenticated','index','/:id','getLogo','/:id/logo_login','/:id/gdpr','/:id/preferred','getPreferred','/:id/favicon','getFavicon','diskStorage','server/files/images/logos/'];(function(_0xc77819,_0x139fdc){var _0x1c9434=function(_0x11d15d){while(--_0x11d15d){_0xc77819['push'](_0xc77819['shift']());}};_0x1c9434(++_0x139fdc);}(_0xae56,0x6b));var _0x6ae5=function(_0x29cea6,_0x163537){_0x29cea6=_0x29cea6-0x0;var _0x5ef938=_0xae56[_0x29cea6];return _0x5ef938;};'use strict';var multer=require(_0x6ae5('0x0'));var util=require(_0x6ae5('0x1'));var path=require(_0x6ae5('0x2'));var timeout=require(_0x6ae5('0x3'));var express=require('express');var router=express[_0x6ae5('0x4')]();var auth=require(_0x6ae5('0x5'));var interaction=require(_0x6ae5('0x6'));var config=require(_0x6ae5('0x7'));var controller=require(_0x6ae5('0x8'));router[_0x6ae5('0x9')]('/',auth[_0x6ae5('0xa')](),controller[_0x6ae5('0xb')]);router[_0x6ae5('0x9')](_0x6ae5('0xc'),controller['show']);router['get']('/:id/logo',controller[_0x6ae5('0xd')]);router[_0x6ae5('0x9')](_0x6ae5('0xe'),controller['getLogoLogin']);router[_0x6ae5('0x9')](_0x6ae5('0xf'),controller['gdpr']);router['get'](_0x6ae5('0x10'),controller[_0x6ae5('0x11')]);router[_0x6ae5('0x9')](_0x6ae5('0x12'),controller[_0x6ae5('0x13')]);var upload=multer({'storage':multer[_0x6ae5('0x14')]({'destination':function(_0x15e72f,_0x9a8580,_0x4ec80e){_0x4ec80e(null,path['join'](config['root'],_0x6ae5('0x15')));},'filename':function(_0x4ace28,_0x1bac53,_0x4db791){_0x4db791(null,util[_0x6ae5('0x16')]('%s%s',_0x6ae5('0x17'),path['extname'](_0x1bac53['originalname'])));}})});router['post'](_0x6ae5('0x18'),upload[_0x6ae5('0x19')]('file'),controller[_0x6ae5('0x1a')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3a0e5b,_0x3c8c90,_0x5d34eb){_0x5d34eb(null,path['join'](config[_0x6ae5('0x1b')],_0x6ae5('0x15')));},'filename':function(_0xe7e3f2,_0x17521b,_0xdc96fc){_0xdc96fc(null,util[_0x6ae5('0x16')](_0x6ae5('0x1c'),_0x6ae5('0x1d'),path[_0x6ae5('0x1e')](_0x17521b[_0x6ae5('0x1f')])));}})});router[_0x6ae5('0x20')](_0x6ae5('0xe'),upload[_0x6ae5('0x19')]('file'),controller[_0x6ae5('0x21')]);var upload=multer({'storage':multer[_0x6ae5('0x14')]({'destination':function(_0xd2d02e,_0x219e62,_0x343b55){_0x343b55(null,path[_0x6ae5('0x22')](config[_0x6ae5('0x1b')],_0x6ae5('0x15')));},'filename':function(_0x65eb0d,_0x4f0906,_0x35f94e){_0x35f94e(null,util[_0x6ae5('0x16')](_0x6ae5('0x1c'),_0x6ae5('0x23'),path['extname'](_0x4f0906[_0x6ae5('0x1f')])));}})});router[_0x6ae5('0x20')](_0x6ae5('0x10'),upload[_0x6ae5('0x19')](_0x6ae5('0x24')),controller[_0x6ae5('0x25')]);var upload=multer({'storage':multer[_0x6ae5('0x14')]({'destination':function(_0x531d55,_0x75e178,_0x51fb6d){_0x51fb6d(null,path['join'](config[_0x6ae5('0x1b')],_0x6ae5('0x15')));},'filename':function(_0x378218,_0x1f39f3,_0x57a2da){_0x57a2da(null,util[_0x6ae5('0x16')](_0x6ae5('0x1c'),_0x6ae5('0x26'),path['extname'](_0x1f39f3[_0x6ae5('0x1f')])));}})});router[_0x6ae5('0x20')](_0x6ae5('0x12'),upload[_0x6ae5('0x19')](_0x6ae5('0x24')),controller[_0x6ae5('0x27')]);router[_0x6ae5('0x28')](_0x6ae5('0xc'),auth[_0x6ae5('0xa')](),controller[_0x6ae5('0x29')]);module[_0x6ae5('0x2a')]=router;