Built motion from commit (unavailable).|2.4.3
[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 _0xb409=['put','update','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./setting.controller','get','isAuthenticated','/:id','show','getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','getPreferred','diskStorage','root','server/files/images/logos/','format','%s%s','logo','extname','originalname','/:id/logo','single','addLogo','logologin','post','file','addLogoLogin','join','preferred','/:id/preferred','addPreferred'];(function(_0x372204,_0x1f3cf9){var _0x53e192=function(_0x56e378){while(--_0x56e378){_0x372204['push'](_0x372204['shift']());}};_0x53e192(++_0x1f3cf9);}(_0xb409,0x174));var _0x9b40=function(_0x44a0b8,_0x4d9270){_0x44a0b8=_0x44a0b8-0x0;var _0xe9e735=_0xb409[_0x44a0b8];return _0xe9e735;};'use strict';var multer=require(_0x9b40('0x0'));var util=require(_0x9b40('0x1'));var path=require(_0x9b40('0x2'));var timeout=require('connect-timeout');var express=require(_0x9b40('0x3'));var router=express[_0x9b40('0x4')]();var auth=require(_0x9b40('0x5'));var interaction=require(_0x9b40('0x6'));var config=require(_0x9b40('0x7'));var controller=require(_0x9b40('0x8'));router[_0x9b40('0x9')]('/',auth[_0x9b40('0xa')](),controller['index']);router[_0x9b40('0x9')](_0x9b40('0xb'),controller[_0x9b40('0xc')]);router[_0x9b40('0x9')]('/:id/logo',controller[_0x9b40('0xd')]);router['get'](_0x9b40('0xe'),controller[_0x9b40('0xf')]);router[_0x9b40('0x9')](_0x9b40('0x10'),controller[_0x9b40('0x11')]);router['get']('/:id/preferred',controller[_0x9b40('0x12')]);var upload=multer({'storage':multer[_0x9b40('0x13')]({'destination':function(_0x171b26,_0x48d2e8,_0x54330d){_0x54330d(null,path['join'](config[_0x9b40('0x14')],_0x9b40('0x15')));},'filename':function(_0x38c3ce,_0x4e8f91,_0x54a8fb){_0x54a8fb(null,util[_0x9b40('0x16')](_0x9b40('0x17'),_0x9b40('0x18'),path[_0x9b40('0x19')](_0x4e8f91[_0x9b40('0x1a')])));}})});router['post'](_0x9b40('0x1b'),upload[_0x9b40('0x1c')]('file'),controller[_0x9b40('0x1d')]);var upload=multer({'storage':multer[_0x9b40('0x13')]({'destination':function(_0xffdade,_0x31d4fb,_0x253c83){_0x253c83(null,path['join'](config[_0x9b40('0x14')],_0x9b40('0x15')));},'filename':function(_0x20c813,_0x58e5f0,_0x430bef){_0x430bef(null,util['format'](_0x9b40('0x17'),_0x9b40('0x1e'),path[_0x9b40('0x19')](_0x58e5f0['originalname'])));}})});router[_0x9b40('0x1f')](_0x9b40('0xe'),upload[_0x9b40('0x1c')](_0x9b40('0x20')),controller[_0x9b40('0x21')]);var upload=multer({'storage':multer[_0x9b40('0x13')]({'destination':function(_0x4e608a,_0x38ab5e,_0x30ed93){_0x30ed93(null,path[_0x9b40('0x22')](config[_0x9b40('0x14')],_0x9b40('0x15')));},'filename':function(_0x407bae,_0x8abcfe,_0x2f4852){_0x2f4852(null,util[_0x9b40('0x16')](_0x9b40('0x17'),_0x9b40('0x23'),path[_0x9b40('0x19')](_0x8abcfe['originalname'])));}})});router[_0x9b40('0x1f')](_0x9b40('0x24'),upload[_0x9b40('0x1c')]('file'),controller[_0x9b40('0x25')]);router[_0x9b40('0x26')](_0x9b40('0xb'),auth[_0x9b40('0xa')](),controller[_0x9b40('0x27')]);module[_0x9b40('0x28')]=router;